Skip to content

Commit

Permalink
fix: incorrect argument passing to git push
Browse files Browse the repository at this point in the history
Signed-off-by: Nat Welch <nat@natwelch.com>
  • Loading branch information
icco authored Oct 15, 2024
1 parent 7cd796f commit d49005b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sync_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}"
}

####################################
Expand Down

0 comments on commit d49005b

Please sign in to comment.