Skip to content

Commit 2f1fe50

Browse files
committed
fixup!: add exit code 0 for duplicate PRs
1 parent 0c2fa97 commit 2f1fe50

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ci/steps/brew-bump.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,16 @@ main() {
8787

8888
# Find the docs for bump-formula-pr here
8989
# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18
90-
# local output
91-
brew bump-formula-pr --version="${VERSION}" code-server --no-browse --no-audit
90+
local output
91+
if ! output=$(brew bump-formula-pr --version="${VERSION}" code-server --no-browse --no-audit 2>&1); then
92+
if [[ $output == *"Duplicate PRs should not be opened"* ]]; then
93+
echo "$VERSION is already submitted"
94+
exit 0
95+
else
96+
echo "$output"
97+
exit 1
98+
fi
99+
fi
92100
}
93101

94102
main "$@"

0 commit comments

Comments
 (0)