-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Use . instead of source in shell scripts #97
Comments
.
instead of source
in scripts/*.sh
@gucharbon While that documentation you provided does indicate the use of /usr/bin/env sh On an Ubuntu system (tested on Ubuntu 18.04.4) you'll find that this works just fine. As the documentation page you referenced indicates in the second paragraph from the top:
The default shell is still The benefit of specifying the So, I don't think it's helpful to make the change from |
@Shackelford-Arden Unless you explicitely start the script with IMO it is clearly a bug to have a script indicating |
My apologies, I managed to test incorrectly when I was looking at this. Guess that's what I get for moving too quickly :) You're correct that |
Shouldn't it be |
I think we are thinking a lot for a really small issue 😄 @StephenBrown2 I guess there is no right or wrong between using I don't really care, and I don't think people will want to run the scripts in environments without bash installed by default (like alpine linux for example). But still, I think that between 2 working solutions, the most portable should always be prefered. |
+1 for |
Thanks for the discussion here everyone! Yeah, agreed that Thanks for the PR with the fix @gucharbon ! 🚀 |
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues. |
* Implement pagination for team invitations * Fix key
I'm using 18.04.3 LTS (Bionic Beaver) and python 3.7.5
I just created my own repository using cookiecutter.
I ran the script
./scripts/build-push.sh
and received the error below:After taking a look at the template I saw that
/bin/sh
is specified in shebang:Ubuntu uses
/bin/dash
in place of/bin/sh
and not/bin/bash
. Ubuntu Wiki states that:Isn't there anybody on Ubuntu or Debian which tried to run the scripts and had this error? I searched existing issue but found none.
Edit: I just saw in the README that user should use
bash
to start scripts (as in the example:TAG=prod FRONTEND_ENV=production bash ./scripts/build-push.sh
) but I still feel that this.
should be used instead ofsource
to be coherent with shebang and to allow usage ofTAG=prod FRONTEND_ENV=production ./scripts/build-push.sh
.Anyway thanks for the awesome work :)
The text was updated successfully, but these errors were encountered: