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

shell script hard mode: set -e #28

Open
rkdarst opened this issue May 21, 2020 · 0 comments
Open

shell script hard mode: set -e #28

rkdarst opened this issue May 21, 2020 · 0 comments
Labels
D:5m 5 minute topic S:tool tool to demonstrate or teach, concrete and ready to go

Comments

@rkdarst
Copy link
Member

rkdarst commented May 21, 2020

  • Discuss set -e and when it is good for shell scripts
  • If you expect a command to fail: command_that_can_fail || true
  • this says set -euo pipefail is the strict mode.
  • Joke: "shell in hard mode", use set -e in an interactive shell
@rkdarst rkdarst added S:tool tool to demonstrate or teach, concrete and ready to go D:5m 5 minute topic labels May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D:5m 5 minute topic S:tool tool to demonstrate or teach, concrete and ready to go
Projects
None yet
Development

No branches or pull requests

1 participant