Skip to content

fix(hooks): support Bash 3.2 on macOS - #345

Open
blackdragoon26 wants to merge 1 commit into
1a1a11a:developfrom
blackdragoon26:fix/hooks-bash-3.2
Open

blackdragoon26 wants to merge 1 commit into
1a1a11a:developfrom
blackdragoon26:fix/hooks-bash-3.2

Conversation

@blackdragoon26

Copy link
Copy Markdown

What does this PR do?

Fixes the pre-commit hook failing on macOS Bash 3.2 because readarray is unavailable. Replaces it with a compatible loop that preserves Python filenames containing spaces and special characters.

Type of change

  • Bug fix
  • New eviction / admission / prefetch algorithm
  • New trace reader or trace format
  • Performance improvement
  • Documentation
  • Build / CI
  • Other:

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-failure passes , tested using _build_dbg
  • Build is warning-free (CI uses -Wall -Wextra -Werror)

Results

The hook no longer exits with readarray: command not found on Bash 3.2. No changes to cache simulation behavior.

Checklist

  • Formatted with clang-format (or the pre-commit hook from scripts/setup_hooks.sh)
  • Added or updated tests
  • Added or updated documentation
  • New algorithms are registered in the CLI and listed in the README

Only the shell script changed. Syntax and ShellCheck pass; no repository tests, documentation, or algorithms were added.

This branch has not been deployed

No deployments
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