Skip to content

Commit ca812bc

Browse files
EtiennePerotgvisor-bot
authored andcommitted
PGO update: Parse flags more correctly.
There is already a loop parsing the `--tolerate-no-profile-changes` flag. Use it. Without this CL, the `git status` command actually always runs, because the `shift` in the earlier loop hides the argument from its view of `"$@"`. PiperOrigin-RevId: 775426052
1 parent aa52ddf commit ca812bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.buildkite/scripts/pgo/maybe-skip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if [[ "$(gh pr --repo="$repo_url" list --label pgo-update --state open --json ti
5252
exit 0
5353
fi
5454

55-
if ! echo "$@" | grep -qFe '--tolerate-no-profile-changes'; then
55+
if [[ "$tolerate_no_profile_changes" == false ]]; then
5656
if [[ "$(git status --porcelain runsc/profiles | wc -l)" == 0 ]]; then
5757
echo "No changes to runsc profiles; skipping." >&2
5858
exit 0

0 commit comments

Comments
 (0)