cmd/go: go tool doesn't pass command name as os.Args[0] when flags are present #70509
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version devel go1.24-efe0a86551 2024-11-21 20:50:15 +0000 linux/amd64
Output of
go env
in your module/workspace:What did you do?
With a basic tool like: https://go.dev/play/p/0MpgRS3gwFS
Invoking it results in:
What did you see happen?
The tool doesn't receive its own name in os.Args[0], messing up argument / flag parsing.
What did you expect to see?
the usual os.Args
The text was updated successfully, but these errors were encountered: