fix: Return exit code 0 on success when running without TTY (e.g. background execution)
This commit is contained in:
3
gp
3
gp
@@ -563,7 +563,7 @@ wait_for_workflow() {
|
|||||||
stty -echo -icanon min 0 time 0 2>/dev/null || true
|
stty -echo -icanon min 0 time 0 2>/dev/null || true
|
||||||
|
|
||||||
# Restore terminal on exit
|
# Restore terminal on exit
|
||||||
trap 'stty "$old_tty" 2>/dev/null; trap - RETURN' RETURN
|
trap 'stty "$old_tty" 2>/dev/null || true; trap - RETURN' RETURN
|
||||||
|
|
||||||
local run_url="" run_id="" found=false
|
local run_url="" run_id="" found=false
|
||||||
local prev_lines=0 # track how many lines we printed last time
|
local prev_lines=0 # track how many lines we printed last time
|
||||||
@@ -986,6 +986,7 @@ main() {
|
|||||||
|
|
||||||
# Execute the commit and push
|
# Execute the commit and push
|
||||||
do_commit_and_push "$commit_message" "$TARGET_BRANCH"
|
do_commit_and_push "$commit_message" "$TARGET_BRANCH"
|
||||||
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run main function
|
# Run main function
|
||||||
|
|||||||
Reference in New Issue
Block a user