From 15ce90e11c881f64ca34a47a1cf699c7e1a77d3f Mon Sep 17 00:00:00 2001 From: Bao Trinh Date: Tue, 15 Feb 2022 04:12:28 -0600 Subject: [PATCH] fix deltion of multiple failed backup snapshots fixes #6 regression introduced by shellcheck fixes (commit a42f661, PR #1). multiple snapshots were passed to `snapper delete` as one argument. revert this line and add shellcheck directive to silence error --- bin/snap-sync | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/snap-sync b/bin/snap-sync index a04471e..0b5ee44 100755 --- a/bin/snap-sync +++ b/bin/snap-sync @@ -333,7 +333,9 @@ for x in $selected_configs; do fi done if [[ "$delete_failed" == [Yy]"es" || "$delete_failed" == [Yy] ]]; then - snapper -c "$x" delete "$(snapper -c "$x" list --disable-used-space | awk '/'$name' backup in progress/ {print $1}')" + # explicit split list of snapshots (on whitespace) into multiple arguments + # shellcheck disable=SC2046 + snapper -c "$x" delete $(snapper -c "$x" list --disable-used-space | awk '/'$name' backup in progress/ {print $1}') fi fi fi