Skip to content

Commit

Permalink
fix(git): skip merge confirm on ci mode
Browse files Browse the repository at this point in the history
  • Loading branch information
keskiju committed Dec 18, 2024
1 parent 61ff341 commit c1834b7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions plugins/git-global/env-merge-50
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ for merge in ${taito_env_merges[@]}; do
# TODO execution should end if one merge fails

taito::execute_on_host_fg "\
(read -t 1 -n 1000 discard || :)
echo -e \"${H2s}Merging ${s} -> ${d}${H2e}\"
read -p \"Do you want to continue? [Y/n] \" -n 1 -r confirm
echo
if ! [[ \${confirm:-y} =~ ^[Yy]*$ ]]; then \
if [[ \"$taito_mode\" != "ci" ]]; then
(read -t 1 -n 1000 discard || :)
read -p \"Do you want to continue? [Y/n] \" -n 1 -r confirm
echo
exit 130; \
if ! [[ \${confirm:-y} =~ ^[Yy]*$ ]]; then \
echo
exit 130; \
fi
fi
echo Merging...
git fetch origin ${s}:${d}
git push --no-verify ${git_push_options} origin ${d}
Expand Down

0 comments on commit c1834b7

Please sign in to comment.