mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
tools: do not mask errors on multiple commit retrieval
In commit-queue.sh, the assignment to `commits` will succeed and the script will continue if one of the two `git` commands fails, even with `-e` set. Split it into three separate assignments so that failures in the `git` commands will be clearly logged and cause the script to exit with a failure status code. PR-URL: https://github.com/nodejs/node/pull/41340 Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
This commit is contained in:
1 parent
26c973d4b3
commit
e7a924e086
1 file changed
+3
-1
@@ -72,7 +72,9 @@ for pr in "$@"; do
|
||||
fi
|
||||
|
||||
if [ -z "$MULTIPLE_COMMIT_POLICY" ]; then
|
||||
commits="$(git rev-parse $UPSTREAM/$DEFAULT_BRANCH)...$(git rev-parse HEAD)"
|
||||
start_sha=$(git rev-parse $UPSTREAM/$DEFAULT_BRANCH)
|
||||
end_sha=$(git rev-parse HEAD)
|
||||
commits="${start_sha}...${end_sha}"
|
||||
|
||||
if ! git push $UPSTREAM $DEFAULT_BRANCH >> output 2>&1; then
|
||||
commit_queue_failed "$pr"
|
||||
|
||||
Reference in new issue
Block a user