From 3dd382723bf794a122239bc1d6b0116662d5ec0f Mon Sep 17 00:00:00 2001 From: Nicolas Karolak Date: Wed, 18 Oct 2023 23:33:03 +0200 Subject: [PATCH] fix: apply shellcheck recommandations (#37) Co-authored-by: Siavash Safi --- delete-old-branches | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/delete-old-branches b/delete-old-branches index ed67be6..1cd6e4a 100755 --- a/delete-old-branches +++ b/delete-old-branches @@ -18,7 +18,8 @@ EXCLUDE_OPEN_PR_BRANCHES=${INPUT_EXCLUDE_OPEN_PR_BRANCHES:-true} # used for GitHub CLI authentication export GITHUB_TOKEN=${INPUT_REPO_TOKEN} -echo "was_dry_run=${DRY_RUN}" >> $GITHUB_OUTPUT +echo "was_dry_run=${DRY_RUN}" >> "$GITHUB_OUTPUT" + deleted_branches=() default_branch_protected() { @@ -115,7 +116,7 @@ main() { delete_branch_or_tag "${br}" "heads" "${sha}" fi done - echo "deleted_branches=${deleted_branches[@]}" >> $GITHUB_OUTPUT + echo "deleted_branches=${deleted_branches[*]}" >> "$GITHUB_OUTPUT" if [[ "${DELETE_TAGS}" == true ]]; then local tag_counter=1 for br in $(git ls-remote -q --tags --refs | sed "s@^.*tags/@@" | sort -rn); do