cmd/go: PKG_CONFIG var misparsed when containing spaces #46228
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
While testing whether it would be possible to do
PKG_CONFIG="go run test.com config" go run .
I noticed that the var is passed through
strings.Fields
go/src/cmd/go/internal/work/exec.go
Line 1375 in 4df662f
go/src/cmd/go/internal/work/exec.go
Lines 2654 to 2660 in 4df662f
Even if the use case of
PKG_CONFIG="go run test.com config"
isn't supposed to work, the code will break if the dir to pkg-config contains spacesWhat did you expect to see?
successful build
What did you see instead?
Issue is related to #41400 but creating a new issue as it is a different var.
The text was updated successfully, but these errors were encountered: