Skip to content

Commit 4758952

Browse files
authored
chore(scripts): fix expression interpreted as exit code on some Bash versions (#13417)
1 parent bee4ece commit 4758952

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

scripts/release/check_commit_metadata.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,19 @@ main() {
122122
fi
123123

124124
if [[ ${title1} != "${title2}" ]]; then
125-
log "Invariant failed, cherry-picked commits have different titles: ${title1} != ${title2}, attempting to check commit body for cherry-pick information..."
125+
log "Invariant failed, cherry-picked commits have different titles: \"${title1%$'\n'}\" != \"${title2%$'\n'}\", attempting to check commit body for cherry-pick information..."
126126

127127
renamed=$(git show "${commit1}" | sed -ne 's/.*cherry picked from commit \([0-9a-f]*\).*/\1/p')
128128
if [[ -n ${renamed} ]]; then
129129
log "Found renamed cherry-pick commit ${commit1} -> ${renamed}"
130130
renamed_cherry_pick_commits[${commit1}]=${renamed}
131131
renamed_cherry_pick_commits[${renamed}]=${commit1}
132132
continue
133-
else
134-
log "Not a cherry-pick commit, adding ${commit1} to pending list..."
135-
renamed_cherry_pick_commits_pending+=("${commit1}")
136133
fi
137-
# error "Invariant failed, cherry-picked commits have different titles: ${title1} != ${title2}"
138-
((i--))
134+
135+
log "Not a cherry-pick commit, adding ${commit1} to pending list..."
136+
renamed_cherry_pick_commits_pending+=("${commit1}")
137+
i=$((i - 1))
139138
continue
140139
fi
141140

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy