mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-28 16:37:43 +08:00
Merge pull request #2950 from thaJeztah/fix_usage_and_completion
fix: strip path from usage output and shell-completion scripts
This commit is contained in:
commit
cf8bf9e104
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/docker/buildx/commands"
|
||||
controllererrors "github.com/docker/buildx/controller/errdefs"
|
||||
@ -41,7 +42,8 @@ func runStandalone(cmd *command.DockerCli) error {
|
||||
}
|
||||
defer flushMetrics(cmd)
|
||||
|
||||
rootCmd := commands.NewRootCmd(os.Args[0], false, cmd)
|
||||
executable := os.Args[0]
|
||||
rootCmd := commands.NewRootCmd(filepath.Base(executable), false, cmd)
|
||||
return rootCmd.Execute()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user