install/uninstall: allow aliasing buildx to docker builder
Currently the user can type `docker buildx` to use this tool. This patch allows the user to install buildx as a `docker builder` alias. As an additional benefit, this allows the regular `docker build` to hook into `buildx build`. Note that the install and uninstall commands are currently hidden. Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
5
vendor/github.com/docker/cli/cli-plugins/plugin/plugin.go
generated
vendored
5
vendor/github.com/docker/cli/cli-plugins/plugin/plugin.go
generated
vendored
@@ -40,10 +40,13 @@ func runPlugin(dockerCli *command.DockerCli, plugin *cobra.Command, meta manager
|
||||
return err
|
||||
}
|
||||
|
||||
cmd, _, err := tcmd.HandleGlobalFlags()
|
||||
cmd, args, err := tcmd.HandleGlobalFlags()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// We've parsed global args already, so reset args to those
|
||||
// which remain.
|
||||
cmd.SetArgs(args)
|
||||
return cmd.Execute()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user