Skip to content

Commit

Permalink
fix fail function exiting with status 0
Browse files Browse the repository at this point in the history
The exit status code variable was not using the correct sh default value
syntax.
  • Loading branch information
jhoblitt committed Apr 20, 2017
1 parent 99b71ea commit 48b8485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/newinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ print_error() {
}

fail() {
code=${2:1}
local code=${2:-1}
[[ -n $1 ]] && print_error "$1"
# shellcheck disable=SC2086
exit $code
Expand Down

0 comments on commit 48b8485

Please sign in to comment.