mirror of https://github.com/docker/cli.git
Fix tests and windows service.
Support args to RunCommand Fix docker help text test. Fix for ipv6 tests. Fix TLSverify option. Fix TestDaemonDiscoveryBackendConfigReload Use tempfile for another test. Restore missing flag. Fix tests for removal of shlex. Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
38aca22dcd
commit
2791c2ec28
5
cobra.go
5
cobra.go
|
@ -28,7 +28,10 @@ func FlagErrorFunc(cmd *cobra.Command, err error) error {
|
||||||
if cmd.HasSubCommands() {
|
if cmd.HasSubCommands() {
|
||||||
usage = "\n\n" + cmd.UsageString()
|
usage = "\n\n" + cmd.UsageString()
|
||||||
}
|
}
|
||||||
return fmt.Errorf("%s\nSee '%s --help'.%s", err, cmd.CommandPath(), usage)
|
return StatusError{
|
||||||
|
Status: fmt.Sprintf("%s\nSee '%s --help'.%s", err, cmd.CommandPath(), usage),
|
||||||
|
StatusCode: 125,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var usageTemplate = `Usage: {{if not .HasSubCommands}}{{.UseLine}}{{end}}{{if .HasSubCommands}}{{ .CommandPath}} COMMAND{{end}}
|
var usageTemplate = `Usage: {{if not .HasSubCommands}}{{.UseLine}}{{end}}{{if .HasSubCommands}}{{ .CommandPath}} COMMAND{{end}}
|
||||||
|
|
Loading…
Reference in New Issue