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

Redefine sh to exit more gracefully if command not found. #7

Open
yeban opened this issue Apr 3, 2017 · 2 comments
Open

Redefine sh to exit more gracefully if command not found. #7

yeban opened this issue Apr 3, 2017 · 2 comments

Comments

@yeban
Copy link
Collaborator

yeban commented Apr 3, 2017

No description provided.

@cmatKhan
Copy link
Contributor

Yes -- agreed. I quickly figured out that I needed to run this with bash, but the error when run from the zsh shell is this:

~/projects/flo/flo_crypto                                                                                                                                                                           8s Py ruby_env
❯ ../flo/scripts/install.sh 
../flo/scripts/install.sh: 3: ../flo/scripts/install.sh: Syntax error: "(" unexpected

would be nice to see a error like: "run me with bash"

@yeban
Copy link
Collaborator Author

yeban commented May 28, 2021

Works with zsh here. The error looks like the script was invoked with sh, which would not recognise the array on line 3. I suppose that can happen if zsh is not your login shell and sh is. Maybe the script should specify a shebang line on top: #!/bin/bash. Feel free to test the idea and send a pull request.

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

No branches or pull requests

2 participants