Skip to content

Commit ec28866

Browse files
committed
Fix mapfile unavailable issue
1 parent a767904 commit ec28866

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/rust-release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,11 @@ jobs:
170170
security import "$cert_path" -k "$keychain_path" -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security
171171
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" "$keychain_path"
172172
173-
mapfile -t codesign_hashes < <(security find-identity -v -p codesigning "$keychain_path" \
174-
| awk 'match($0, /[0-9A-F]{40}/) { print substr($0, RSTART, RLENGTH) }' \
173+
codesign_hashes=()
174+
while IFS= read -r hash; do
175+
[[ -n "$hash" ]] && codesign_hashes+=("$hash")
176+
done < <(security find-identity -v -p codesigning "$keychain_path" \
177+
| sed -n 's/.*\([0-9A-F]\{40\}\).*/\1/p' \
175178
| sort -u)
176179
177180
if ((${#codesign_hashes[@]} == 0)); then

0 commit comments

Comments
 (0)