fix: make bin/log compatible with Bash 3.2 on macOS (closes #1440) - #1442
Conversation
Replace the Bash 4+ `mapfile` builtin with portable `while read` and `for` loops so bin/log works on stock macOS (Bash 3.2). Also build the specific-files path array directly, fixing a latent bug where multiple log file arguments collapsed into a single tail argument. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR Summary
|
Summary
bin/logused themapfilebuiltin (Bash 4+), which fails on stock macOS (Bash 3.2) withbin/log: line 44: mapfile: command not found(#1440).This replaces
mapfilewith portable constructs:while IFS= read -rloopforloop building the path arrayThe latter also fixes a latent bug — the old
generate_logs_file_pathhelperecho'd all paths onto one space-separated line, so multiple file args (bin/log system.log cache.log) collapsed into a singletailargument even on Bash 4. The now-unused helper was removed.Testing
bash -n compose/bin/logpassesCloses #1440
🤖 Generated with Claude Code