Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

Conversation

@skoehnen
Copy link
Collaborator

@skoehnen skoehnen commented Jan 6, 2022

@olinux does anything speak against this?
This should cause the script to fail if any of the commands fails.
Like discussed in Slack we definitely need to take another look at the error-handling.

@skoehnen skoehnen requested a review from olinux January 6, 2022 14:37
#!/bin/bash

# Guarantee script exits with a non-zero return-code if a command below fails.
set -e

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would even recommend to go further

Suggested change
set -e
set -eu -o pipefail

since pipes are used

but in either case - requires review of the script to ensure that nothing ATM relies on tools exiting non-0 etc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants