go-internal
go-internal copied to clipboard
Using golang.org/dl/go1.12 with testscript
Hi, I have go in my $PATH
by symlinking to a golang.org/dl/go*
binary. The problem is, that binary seems to locate itself by using the home directory.
The net result is that when I run this, exec go build
doesn't work, because:
> exec go build
[stderr]
go1.12: not downloaded. Run 'go1.12 download' to install to /no-home/sdk/go1.12
... i.e, it thinks it isn't yet installed. Any tricks for working around this?
@mvdan - do you use golang.org/dl/go*
?
I'm afraid I don't use it. Instead I have full installs and use process mount namespaces to flip between versions (largely to avoid any issues with binaries being called go1.12
etc)
Hmm, I do use golang.org/dl/go*
for old Go versions. Right now, I have go1.11.5
set up via that.
Perhaps a way to work around this would be to run testscript with an explicit GOROOT
, and then teach programs like go1.11.5
to look there.