Fix shellcheck globbing warning

This commit is contained in:
Nicolas Chan 2021-05-03 22:11:19 -07:00
parent ca2e82815a
commit 34503cfbd8

View file

@ -538,11 +538,11 @@ do-backup () {
}
if [[ "$LOCK_FILE" != "" ]]; then
TIMEOUT_OPTION=""
TIMEOUT_OPTION=()
if [[ "$LOCK_FILE_TIMEOUT" != "" ]]; then
TIMEOUT_OPTION="-w $LOCK_FILE_TIMEOUT"
TIMEOUT_OPTION=("-w" "$LOCK_FILE_TIMEOUT")
fi
(if ! flock $TIMEOUT_OPTION --no-fork 200; then
(if ! flock "${TIMEOUT_OPTION[@]}" --no-fork 200; then
log-fatal "Could not acquire lock on lock file: $LOCK_FILE"
exit 1
fi