New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/getgo: installer does not work on alpine using sh #21264

Open
SamWhited opened this Issue Aug 1, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@SamWhited
Copy link
Member

SamWhited commented Aug 1, 2017

What version of Go are you using (go version)?

None yet, trying to install it!

What operating system and processor architecture are you using (go env)?

Linux amd64

What did you do?

$ docker pull alpine:latest
$ docker run -i -t alpine:latest /bin/sh
# apk update && apk add curl
# curl -LO https://get.golang.org/$(uname)/go_installer && chmod +x go_installer && ./go_installer && rm go_installer
Welcome to the Go installer!
Downloading Go version go1.8.3 to /root/.go
This may take a bit of time...
"" is not a supported shell

What did you expect to see?

Go installed (or at least "sh" is not a supported shell if bourne shells are required or something similar)

What did you see instead?

"" is not a supported shell

@SamWhited SamWhited changed the title tools/cmd/getgo: installer does not work on alpine in sh tools/cmd/getgo: installer does not work on alpine using sh Aug 1, 2017

@mikioh mikioh changed the title tools/cmd/getgo: installer does not work on alpine using sh x/tools/cmd/getgo: installer does not work on alpine using sh Aug 3, 2017

@gopherbot gopherbot added this to the Unreleased milestone Aug 3, 2017

@jessfraz

This comment has been minimized.

Copy link
Contributor

jessfraz commented Aug 23, 2017

set -e SHELL=sh on the container

@SamWhited

This comment has been minimized.

Copy link
Member

SamWhited commented Aug 23, 2017

Thanks! I didn't realize it was getting the name from $SHELL. Either way, sh does not appear to be supported sadly:

"/bin/sh" is not a supported shell

@jessfraz

This comment has been minimized.

Copy link
Contributor

jessfraz commented Aug 23, 2017

@Gnouc

This comment has been minimized.

Copy link
Contributor

Gnouc commented Jan 18, 2018

so the point of the installer is to mod the rc file for the shell so we
should probably add sh but also this is mainly geared towards people
setting up their dev env and i dont know how common sh will be

The fact is that sh must be present in any POSIX compliant systems, but its path isn't standard, can be /bin/sh or /usr/xpg4/bin/sh ...

Also rc file isn't mandatory by POSIX spec, so I see the installer only support bash and zsh for now.

I think a more friendly approach is printing all the export lines, and convince the user to export them when start the shell (when the shell is not bash, zsh or other shells which don't have rc file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment