diff options
author | Bryan C. Mills <bcmills@google.com> | 2022-08-18 13:54:43 -0400 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2022-10-24 21:18:16 +0000 |
commit | a971904e10c85e4aeb2cb6a3cf6d8efadc259fdc (patch) | |
tree | 343ac469e31cf9b6d2e38e91f99916b6139fa504 /src/cmd/go/script_test.go | |
parent | 151668c694a15029db236976f06f18482859db61 (diff) | |
download | go-git-a971904e10c85e4aeb2cb6a3cf6d8efadc259fdc.tar.gz |
cmd/go/internal/script: remove special-case escaping logic for $WORK
Previously, the script engine implicitly escaped the path in the
$WORK environment variable to be the literal string '$WORK', which
produces somewhat better error messages in case of failure.
However, for a general-purpose script engine that implicit behavior is
surprising, and it isn't really necessary.
For #27494.
Change-Id: Ic1d5b8801bbd068157315685539e7cc2795b3aa5
Reviewed-on: https://go-review.googlesource.com/c/go/+/426854
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/script_test.go')
-rw-r--r-- | src/cmd/go/script_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index e362ec3466..f0fe6d0460 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -115,11 +115,9 @@ func TestScript(t *testing.T) { t.Fatal(err) } - if *testWork { - work, _ := s.LookupEnv("WORK") - t.Logf("$WORK=%s", work) - } t.Log(time.Now().UTC().Format(time.RFC3339)) + work, _ := s.LookupEnv("WORK") + t.Logf("$WORK=%s", work) // With -testsum, if a go.mod file is present in the test's initial // working directory, run 'go mod tidy'. |