mirror of
https://github.com/moby/moby.git
synced 2026-08-07 16:41:50 +00:00
Merge pull request #28501 from tonistiigi/fix-daemon-cmd
Skip cli initialization for daemon command
This commit is contained in:
@@ -39,6 +39,10 @@ func newDockerCommand(dockerCli *command.DockerCli) *cobra.Command {
|
||||
return nil
|
||||
},
|
||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
// daemon command is special, we redirect directly to another binary
|
||||
if cmd.Name() == "daemon" {
|
||||
return nil
|
||||
}
|
||||
// flags must be the top-level command flags, not cmd.Flags()
|
||||
opts.Common.SetDefaultOptions(flags)
|
||||
dockerPreRun(opts)
|
||||
|
||||
Reference in New Issue
Block a user