mirror of
https://github.com/golang/go
synced 2024-11-23 00:00:07 -07:00
cmd/go: update PWD variable for 'go generate'
Most subprocess invocations in the go command use base.AppendPWD to append an accurate value of PWD to the command's environment, which can speed up calls like os.Getwd and also help to provide less-confusing output from scripts. Update `go generate` to do so. Fixes #43862 Change-Id: I3b756f1532b2d922f7d74fd86414d5567a0122c0
This commit is contained in:
parent
01293bf553
commit
3ec8da265a
2
src/cmd/go/testdata/script/generate.txt
vendored
2
src/cmd/go/testdata/script/generate.txt
vendored
@ -28,7 +28,7 @@ stdout 'main_test'
|
|||||||
|
|
||||||
# Test go generate provides the right "$PWD"
|
# Test go generate provides the right "$PWD"
|
||||||
go generate './generate/env_pwd.go'
|
go generate './generate/env_pwd.go'
|
||||||
stdout $WORK'/gopath/src/generate'
|
stdout $WORK'[/\\]gopath[/\\]src[/\\]generate'
|
||||||
|
|
||||||
-- echo.go --
|
-- echo.go --
|
||||||
package main
|
package main
|
||||||
|
Loading…
Reference in New Issue
Block a user