go/src/run.rc
Bryan C. Mills 69756b38f2 cmd/dist: move more environment logic into cmd/dist from make and run scripts
'go tool dist env' outputs different (and fewer) environment variables
than 'go env'. The 'go tool dist env' variables should be
authoritative, whereas many printed by 'go env' are merely
informational (and not intended to be overridden in the actual
environment).

Fixes #52009

Change-Id: Ic0590153875183135cebf7ca55ead7c2b4038569
Reviewed-on: https://go-review.googlesource.com/c/go/+/398061
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-05 21:45:19 +00:00

17 lines
396 B
Bash
Executable file

#!/bin/rc -e
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
rfork e
if(! test -f ../bin/go){
echo 'run.rc must be run from $GOROOT/src after installing cmd/go' >[1=2]
exit wrongdir
}
eval `{../bin/go tool dist env}
GOPATH=/nonexist-gopath
exec ../bin/go tool dist test -rebuild $*