Skip to content

Commit

Permalink
shellcheck: fix SC2164: Use 'cd ... || exit' or 'cd ... || return' in…
Browse files Browse the repository at this point in the history
… case cd fails.

Signed-off-by: Quentin Schulz <[email protected]>
  • Loading branch information
QSchulz authored and JoshuaWatt committed Jul 15, 2021
1 parent 7d3f50f commit 108c02e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lint
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if ! which black > /dev/null 2>&1; then
exit 1
fi

cd "$(readlink -f "$(dirname "$0")")"
cd "$(readlink -f "$(dirname "$0")")" || exit 1
if [ "$1" = "-r" ] || [ "$1" = "--reformat" ]; then
# shellcheck disable=SC2046
black $(git ls-files '*.py')
Expand Down

0 comments on commit 108c02e

Please sign in to comment.