mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2024-12-22 10:45:29 +00:00
Fix ordering of library function call and include of library #68
Fix validation bool function and turn on halt and exit flag `set -e` to guard against regression.
This commit is contained in:
parent
982de21c87
commit
9bc3e210f3
|
@ -1,15 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Include library.
|
||||||
|
script_dir="$(dirname -- "$(realpath -- "${0}")")"
|
||||||
|
source "${script_dir}/lib.sh"
|
||||||
|
|
||||||
# Debug mode for diagnosing issues.
|
# Debug mode for diagnosing issues.
|
||||||
# Setup first before other operations.
|
# Setup first before other operations.
|
||||||
debug="${4}"
|
debug="${4}"
|
||||||
validate_bool "${debug}" debug 1
|
validate_bool "${debug}" debug 1
|
||||||
test ${debug} == "true" && set -x
|
test ${debug} == "true" && set -x
|
||||||
|
|
||||||
# Include library.
|
|
||||||
script_dir="$(dirname -- "$(realpath -- "${0}")")"
|
|
||||||
source "${script_dir}/lib.sh"
|
|
||||||
|
|
||||||
# Directory that holds the cached packages.
|
# Directory that holds the cached packages.
|
||||||
cache_dir="${1}"
|
cache_dir="${1}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue