Skip to content

Commit 44e59ba

Browse files
fix: incorrect argument passing to git push (#574)
Signed-off-by: Nat Welch <[email protected]> Co-authored-by: andy Augustin <[email protected]>
1 parent 1c776a0 commit 44e59ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sync_template.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,19 +293,19 @@ function push () {
293293
local is_force=$2
294294
local is_with_tags=$3
295295

296-
local additional_params=" "
296+
args=(--set-upstream origin "${branch}")
297297

298298
if [ "$is_force" == true ] ; then
299299
warn "forcing the push."
300-
additional_params="${additional_params}--force "
300+
args+=(--force)
301301
fi
302302

303303
if [ "$is_with_tags" == true ] ; then
304304
warn "include tags."
305-
additional_params="${additional_params}--tags "
305+
args+=(--tags)
306306
fi
307307

308-
git push "${additional_params}"--set-upstream origin "${branch}"
308+
git push "${args[@]}"
309309
}
310310

311311
####################################

0 commit comments

Comments
 (0)