Replace mapfile with a bash 3.2-safe loop in cache-key.sh #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-bash32-mapfile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On a macOS runner this action's
cache cargostep died with:cache-key.shruns underset -euo pipefailand usedmapfile, a bash 4+ builtin. macOS ships bash 3.2, which has nomapfile, so the step exited 127. The Linux CI runner's newer bash hid it (same situation as the setup-rust-action bash 3.2 fix).Reads the sorted/de-duped lock paths with a portable
while readloop instead, guards the array expansions for the empty case underset -u, and adds a static check to the suite thatmapfile/readarraydon't return. Verified: the suite passes under/bin/bash3.2, and a direct 3.2 run yields 0 entries for empty input and correct de-dup for populated input.After merge this needs
v1.0.1cut andv1moved so@v1consumers pick it up.