Skip to content

Commit ce2d4f3

Browse files
committed
fix: avoid mapfile in upload-release-to-gcs.sh
mapfile is bash 4+; macOS ships bash 3.2 at /bin/bash, so the script errored with "mapfile: command not found" when run locally. Replace with a portable read loop.
1 parent 33f41c0 commit ce2d4f3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/upload-release-to-gcs.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ echo "Release: $RELEASE_TAG (commit ${SHORT_HASH})"
7373
echo "Target: ${BUCKET_URI}"
7474
$DRY_RUN && echo "Mode: dry-run"
7575

76-
mapfile -t ASSETS < <(gh release view "$RELEASE_TAG" --repo "$REPO" --json assets \
76+
ASSETS=()
77+
while IFS= read -r line; do
78+
[[ -n "$line" ]] && ASSETS+=("$line")
79+
done < <(gh release view "$RELEASE_TAG" --repo "$REPO" --json assets \
7780
--jq '.assets[] | select(.name | test("^vmlinux-.*\\.bin$")) | .name')
7881

7982
if [[ "${#ASSETS[@]}" -eq 0 ]]; then

0 commit comments

Comments
 (0)