From 8de55f4e8b6c3dc3b63b51a976bf15dc84342c77 Mon Sep 17 00:00:00 2001 From: Samuel MORO Date: Fri, 11 Oct 2024 21:25:59 +0000 Subject: [PATCH] let's try not to introduce bugs of our own ... --- scripts/commands/helm.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/commands/helm.sh b/scripts/commands/helm.sh index 3c537410..2aa862c8 100644 --- a/scripts/commands/helm.sh +++ b/scripts/commands/helm.sh @@ -32,14 +32,11 @@ _trap_hook() { _idx=1 while test "$_idx" -lt "$_max"; do f="$(awk "BEGIN{FS=\"\x00\"}{print \$$_idx}" "${decrypted_file_list}")" + _idx="$(expr "$_idx" + 1)" rm "$f" || continue if [ "${QUIET}" = "false" ]; then printf "[helm-secrets] Removed: %s\n" "$f" fi - # shellcheck won't like that one ... - # but can we _idx=$((_idx+1)) here / what would other tests say? - # ... I'm already banking a lot on awk ... maybe next try ... - _idx="$(expr "$_idx" + 1)" done >&2 rm "${decrypted_file_list}"