Fix a variable undefined error

This commit is contained in:
Chai Feng 2020-08-12 13:31:27 +08:00
parent 3739f1396b
commit 173f9659d7

View File

@ -276,7 +276,7 @@ function rm-on-exit() {
}
function on-exit() {
for file in "${files_to_be_deleted[@]}"; do
for file in "${files_to_be_deleted[@]:-}"; do
[[ -f "$file" ]] && rm -r "$file"
done
files_to_be_deleted=()