Repository navigation
fix(hooks): support Bash 3.2 on macOS - #345
Open
blackdragoon26 wants to merge 1 commit into
Open
blackdragoon26 wants to merge 1 commit into
blackdragoon26 wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
What does this PR do?
Fixes the pre-commit hook failing on macOS Bash 3.2 because
readarrayis unavailable. Replaces it with a compatible loop that preserves Python filenames containing spaces and special characters.Type of change
How was it tested?
Tested on macOS with Bash 3.2. The hook handles Python filenames with spaces and special characters and still rejects lint and formatting errors.
Shell syntax and ShellCheck pass. The Debug build succeeds, and all 10 tests pass with
ctest --test-dir _build_dbg --output-on-failure --parallel 4.Linux was not tested locally. The build reports one existing warning in
libCacheSim/bin/debug/main.cpp.ctest --test-dir _build --output-on-failurepasses , tested using_build_dbg-Wall -Wextra -Werror)Results
The hook no longer exits with
readarray: command not foundon Bash 3.2. No changes to cache simulation behavior.Checklist
clang-format(or the pre-commit hook fromscripts/setup_hooks.sh)Only the shell script changed. Syntax and ShellCheck pass; no repository tests, documentation, or algorithms were added.