Convert 'docker create' to use cobra and pflag

Return the correct status code on flag parsins errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5ab24342258c70438ab8edf708ebc466b1677f38
Component: engine
This commit is contained in:
Daniel Nephin
2016-05-31 22:19:13 -07:00
committed by Vincent Demeester
parent d601c75fe5
commit 27d26eeb56
18 changed files with 301 additions and 253 deletions

View File

@ -894,7 +894,7 @@ func (s *DockerSuite) TestRunSysctls(c *check.C) {
runCmd := exec.Command(dockerBinary, "run", "--sysctl", "kernel.foobar=1", "--name", "test2", "busybox", "cat", "/proc/sys/kernel/foobar")
out, _, _ = runCommandWithOutput(runCmd)
if !strings.Contains(out, "invalid value") {
if !strings.Contains(out, "invalid argument") {
c.Fatalf("expected --sysctl to fail, got %s", out)
}
}