1
0
mirror of https://github.com/opencontainers/runc.git synced 2025-04-18 19:44:09 +03:00

delete, start: remove newline from errors

Error messages should not usually contain newlines.

Testing shows that the error runc delete prints is the same before and
after this commit:

	[kir@kir-rhat runc-tst]$ sudo ../runc/runc delete xx3
	ERRO[0000] cannot delete container xx3 that is not stopped: running
	[kir@kir-rhat runc-tst]$

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2021-08-04 20:08:40 -07:00
parent bcadc5bf3e
commit 1545ea69b7
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ status of "ubuntu01" as "stopped" the following will delete resources held for
if force {
return killContainer(container)
}
return fmt.Errorf("cannot delete container %s that is not stopped: %s\n", id, s)
return fmt.Errorf("cannot delete container %s that is not stopped: %s", id, s)
}
return nil

View File

@ -48,7 +48,7 @@ your host.`,
case libcontainer.Running:
return errors.New("cannot start an already running container")
default:
return fmt.Errorf("cannot start a container in the %s state\n", status)
return fmt.Errorf("cannot start a container in the %s state", status)
}
},
}