Skip to content

Commit

Permalink
util: exit when assertion functions fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
CptGit committed Jul 20, 2021
1 parent 8ec4282 commit 9c2b4cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BCV/Util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function assert_var_set() {

local name="$1"; shift
if ! is_variable_set "$name"; then
log e "Variable \"${name}\" is NOT set!"
log_e_and_exit "Variable \"${name}\" is NOT set!"
fi
}

Expand All @@ -190,7 +190,7 @@ function assert_file_exists() {
### @file the path of the given file

local file="$1"; shift
test -f "$file" || log e "File $file does NOT exist!"
test -f "$file" || log_e_and_exit "File $file does NOT exist!"
}


Expand Down

0 comments on commit 9c2b4cc

Please sign in to comment.