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

bash-specific syntax in build.sh (maybe others) with shebang line #!/bin/sh #105

Closed
jingyuanliang opened this issue Nov 10, 2023 · 1 comment · Fixed by #106
Closed

bash-specific syntax in build.sh (maybe others) with shebang line #!/bin/sh #105

jingyuanliang opened this issue Nov 10, 2023 · 1 comment · Fixed by #106
Assignees

Comments

@jingyuanliang
Copy link
Contributor

jingyuanliang commented Nov 10, 2023

So if the build image is switched to something with sh symlinked to others (eg. dash, in google-go.pkg.dev/golang), build fails.

make all 
# building for linux/amd64
./build/build.sh: 19: set: Illegal option -o pipefail
make: *** [Makefile:157: go-build] Error 2

We should consider removing bash-specific syntax, or declaring the shebang line as #!/bin/bash.

jingyuanliang added a commit to jingyuanliang/go-build-template that referenced this issue Nov 10, 2023
@jingyuanliang
Copy link
Contributor Author

jingyuanliang commented Nov 10, 2023

It turns out the default golang:1.21-alpine is not bash either. It's busybox, and it doesn't even have a bash. Maybe use POSIX sh syntax only as a solution.

jingyuanliang added a commit to jingyuanliang/go-build-template that referenced this issue Nov 10, 2023
thockin pushed a commit that referenced this issue Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants