Use Args in cobra.Command to validate args.
Also re-use context. Signed-off-by: Daniel Nephin <dnephin@docker.com> Upstream-commit: fc5a4514fbe1b402d2a0bff170486ac3de4bf8cc Component: engine
This commit is contained in:
@@ -335,7 +335,7 @@ func testCommand(cmd string, newEnvs []string, scanForHome bool, home string) er
|
||||
return fmt.Errorf("Should not have full usage on %q\n", args)
|
||||
}
|
||||
if strings.HasSuffix(stderr, "\n\n") {
|
||||
return fmt.Errorf("Should not have a blank line on %q\n", args)
|
||||
return fmt.Errorf("Should not have a blank line on %q\n%v", args, stderr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user