Shellcheck: SC2164 Use 'cd ... || exit' or 'cd ... || return' in case cd fails

This commit is contained in:
Nick Schonning 2017-06-14 03:54:55 -04:00
parent cce56a99b9
commit c11be06fa4
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ fatal() {
exit 1 exit 1
} }
cd "$(cd "${0%/*}" && pwd -P)"; cd "$(cd "${0%/*}" && pwd -P)" || exit;
versions=( "$@" ) versions=( "$@" )
if [ ${#versions[@]} -eq 0 ]; then if [ ${#versions[@]} -eq 0 ]; then