Skip to content
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

Closed
SamWhited opened this issue Aug 1, 2017 · 6 comments
Closed

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

SamWhited opened this issue Aug 1, 2017 · 6 comments
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@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
Copy link
Contributor

jessfraz commented Aug 23, 2017

set -e SHELL=sh on the container

@SamWhited
Copy link
Member Author

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
Copy link
Contributor

jessfraz commented Aug 23, 2017 via email

@cuonglm
Copy link
Member

cuonglm 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).

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
@AlexisWilke
Copy link

I ran in that problem while creating a Docker with the latest version of Go.

Somehow, the SHELL variable was defined but the go_installer was not able to find it until I did:

export SHELL=/bin/bash

Then it worked as expected.

@hyangah
Copy link
Contributor

hyangah commented Feb 16, 2024

Closing - getgo is deprecated. #60951

@hyangah hyangah closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

6 participants