Skip to content

Commit

Permalink
setup-dns: fixed potential regression issue with removals when alread…
Browse files Browse the repository at this point in the history
…y removed
  • Loading branch information
balupton committed Jan 23, 2025
1 parent 954ed17 commit 1fc467c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/setup-dns
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ function setup_dns() (
# remove files
local had_removal='no'
mapfile -t remove_paths_that_exist < <(echo-if-present --sudo -- "${remove_paths[@]}")
if fs-rm --quiet --confirm --sudo -- "${remove_paths_that_exist[@]}"; then
if [[ "${#remove_paths_that_exist[@]}" -ne 0 ]] && fs-rm --quiet --confirm --sudo -- "${remove_paths_that_exist[@]}"; then
had_removal='yes'
fi

Expand Down

0 comments on commit 1fc467c

Please sign in to comment.