diff options
author | 2020-02-22 20:49:17 -0800 | |
---|---|---|
committer | 2020-02-22 20:49:17 -0800 | |
commit | 9cf62966c410acaf6912a2ecca75e82f07ea6937 (patch) | |
tree | 96ffc2bb67df02f19276e4c120a73147d842042c | |
parent | CI: cache the response from Azure API (diff) |
CI: fix unbound variable error when checking cache
The array shouldn't be expanded when testing with -v.
-rwxr-xr-x | scripts/check_dockerfiles.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/check_dockerfiles.sh b/scripts/check_dockerfiles.sh index 1764017..a94ccb4 100755 --- a/scripts/check_dockerfiles.sh +++ b/scripts/check_dockerfiles.sh @@ -19,7 +19,7 @@ get_build() { local branch="${1:?"get_build: argument 1 'branch' is unset"}" # Attempt to use cached value - if [[ -v "${build_cache[$branch]}" ]]; then + if [[ -v build_cache["${branch}"] ]]; then printf '%s' "${build_cache[$branch]}" return 0 fi |