Skip to content

Fix non-portable find -iname in verify-release-candidate.sh#1613

Open
viirya wants to merge 1 commit into
apache:mainfrom
viirya:fix-find-iname-portability
Open

Fix non-portable find -iname in verify-release-candidate.sh#1613
viirya wants to merge 1 commit into
apache:mainfrom
viirya:fix-find-iname-portability

Conversation

@viirya

@viirya viirya commented Jun 27, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

No separate issue filed; this is a small portability fix to the release verification script.

Rationale for this change

The SNAPSHOT-version guard in verify-release-candidate.sh runs:

if ( find -iname 'Cargo.toml' | xargs grep SNAPSHOT ); then

find is invoked without a starting path. GNU find (Linux) tolerates this and treats the current directory as the start, but BSD find (macOS) rejects it:

find: illegal option -- i

When that happens, find prints the usage error and produces no output, so the piped xargs grep SNAPSHOT receives nothing and exits non-zero. The if (...) therefore evaluates false and the script continues — meaning the SNAPSHOT check is silently skipped on macOS rather than actually running. A release verifier on macOS would get a passing run without this safety check ever executing.

This surfaced while verifying the 54.0.0 RC on macOS.

What changes are included in this PR?

Add an explicit . starting path:

if ( find . -iname 'Cargo.toml' | xargs grep SNAPSHOT ); then

This is accepted by both GNU and BSD find, so the SNAPSHOT check runs correctly on Linux and macOS.

Are there any user-facing changes?

No. This only affects the release-candidate verification script used by maintainers.

This pull request and its description were written by Isaac.

The SNAPSHOT check used `find -iname 'Cargo.toml'` without a starting
path. GNU find tolerates this, but BSD find (macOS) rejects it with
`find: illegal option -- i`. The error makes the piped `xargs grep`
receive no input and return non-zero, so the `if` silently evaluates
false and the SNAPSHOT check is skipped on macOS rather than running.

Add the explicit `.` starting path so the check works on both GNU and
BSD find.

Co-authored-by: Isaac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant