Skip to content

Commit

Permalink
Fix ordering of library function call and include of library #68
Browse files Browse the repository at this point in the history
Fix validation bool function and turn on halt and exit flag `set -e` to guard against regression.
  • Loading branch information
awalsh128 authored Nov 24, 2022
1 parent 982de21 commit 9bc3e21
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pre_cache_action.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/bin/bash

set -e

# Include library.
script_dir="$(dirname -- "$(realpath -- "${0}")")"
source "${script_dir}/lib.sh"

# Debug mode for diagnosing issues.
# Setup first before other operations.
debug="${4}"
validate_bool "${debug}" debug 1
test ${debug} == "true" && set -x

# Include library.
script_dir="$(dirname -- "$(realpath -- "${0}")")"
source "${script_dir}/lib.sh"

# Directory that holds the cached packages.
cache_dir="${1}"

Expand Down

0 comments on commit 9bc3e21

Please sign in to comment.