From 44e59ba38bf03b73ddf96462365826b01cf7f1b8 Mon Sep 17 00:00:00 2001 From: Nat Welch Date: Tue, 15 Oct 2024 16:40:50 -0400 Subject: [PATCH] fix: incorrect argument passing to git push (#574) Signed-off-by: Nat Welch Co-authored-by: andy Augustin --- src/sync_template.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sync_template.sh b/src/sync_template.sh index b91d9c7..fae847a 100755 --- a/src/sync_template.sh +++ b/src/sync_template.sh @@ -293,19 +293,19 @@ function push () { local is_force=$2 local is_with_tags=$3 - local additional_params=" " + args=(--set-upstream origin "${branch}") if [ "$is_force" == true ] ; then warn "forcing the push." - additional_params="${additional_params}--force " + args+=(--force) fi if [ "$is_with_tags" == true ] ; then warn "include tags." - additional_params="${additional_params}--tags " + args+=(--tags) fi - git push "${additional_params}"--set-upstream origin "${branch}" + git push "${args[@]}" } ####################################