fix: resolve mapfile compatibility issue in build architecture guard
- Replace mapfile command with portable alternative for cross-shell compatibility - Add troubleshooting documentation for common shell compatibility issues - Update BUILDING.md with Build Architecture Guard documentation - Ensure script works across different shell environments Fixes pre-commit hook failures on macOS and other systems where mapfile is not available.
This commit is contained in:
@@ -111,7 +111,10 @@ main() {
|
||||
log_info "Running Build Architecture Guard..."
|
||||
|
||||
# Collect changed files
|
||||
mapfile -t changed_files < <(collect_files "$mode" "$arg")
|
||||
changed_files=()
|
||||
while IFS= read -r line; do
|
||||
[[ -n "$line" ]] && changed_files+=("$line")
|
||||
done < <(collect_files "$mode" "$arg")
|
||||
|
||||
if [[ ${#changed_files[@]} -eq 0 ]]; then
|
||||
log_info "No files changed, guard check passed"
|
||||
|
||||
Reference in New Issue
Block a user