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

Improve Shell Default Arguments #151

Closed
mikemhenry opened this issue Sep 29, 2023 · 1 comment · Fixed by #152
Closed

Improve Shell Default Arguments #151

mikemhenry opened this issue Sep 29, 2023 · 1 comment · Fixed by #152

Comments

@mikemhenry
Copy link
Contributor

RE: https://github.com/mamba-org/setup-micromamba#about-login-shells

I am wondering if we should advise people to use something like shell: bash -leo pipefail {0} instead of shell: bash -l {0} since the default-ish behavior here https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell is for shells to set -e, which users will lose if only -l is used.

I am happy to submit a PR for this document tweak.

@pavelzw
Copy link
Member

pavelzw commented Sep 30, 2023

Sounds good, happy to merge 👍🏻

mikemhenry added a commit to mikemhenry/setup-micromamba that referenced this issue Sep 30, 2023
Resolves mamba-org#151

Advise users to use "bash -leo pipefail {0}" instead of "bash -l {0}"
since without "-eo pipefail" errors can happen in a shell script, but
keep CI running without an error. Most users will want a shell where if
a pipe eats a non zero exit, the program propigates the error.
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