fix(scripts): replace GNU-only find -printf with POSIX-compliant alternative#4
Open
smoparth wants to merge 1 commit into
Open
fix(scripts): replace GNU-only find -printf with POSIX-compliant alternative#4smoparth wants to merge 1 commit into
smoparth wants to merge 1 commit into
Conversation
…rnative
Replace `find -printf '%f\n'` with `find -exec basename {} \;` in
generate-containerfile.sh and check-cuda-versions.yml to fix macOS
compatibility. BSD find (default on macOS) does not support -printf,
causing app.conf generation to silently fail.
Adds regression test to prevent reintroduction of non-portable find flags.
Fixes opendatahub-io#143
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
find -printfwith POSIX-compliant-exec basename {} \;ingenerate-containerfile.shand CI workflowfindflagsDetails
find_latest_version()inscripts/generate-containerfile.shusedfind -printf '%f\n', a GNU extension not available on macOS BSDfind. This causedapp.confgeneration to silently fail on macOS, producing only aContainerfilewithout the companion config file.Files changed
scripts/generate-containerfile.sh— replaced-printf '%f\n'with-exec basename {} \;(lines 96, 99).github/workflows/check-cuda-versions.yml— same fix for consistency (line 50)tests/test_generate_containerfile.sh— new regression test (7 tests)Test plan
bash tests/test_generate_containerfile.sh— all 7 tests pass./scripts/generate-containerfile.sh cuda 14.0generates both Containerfile and app.confFixes opendatahub-io#143
🤖 Generated with Claude Code