Skip to content

Commit

Permalink
Merge pull request #2950 from thaJeztah/fix_usage_and_completion
Browse files Browse the repository at this point in the history
fix: strip path from usage output and shell-completion scripts
  • Loading branch information
crazy-max authored Feb 2, 2025
2 parents 934841f + bb4bef2 commit cf8bf9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/buildx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"path/filepath"

"github.com/docker/buildx/commands"
controllererrors "github.com/docker/buildx/controller/errdefs"
Expand Down Expand Up @@ -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()
}

Expand Down

0 comments on commit cf8bf9e

Please sign in to comment.