From 73f23f07e3482993c8fdd53f002e66fa724bb1de Mon Sep 17 00:00:00 2001 From: Alex Cheema Date: Sun, 15 Feb 2026 13:15:20 -0800 Subject: [PATCH] fix: parse hdiutil mount point correctly in create-dmg.sh The awk command was matching the first '/' in the line (from /dev/diskXsY) instead of the mount path (/Volumes/...). Use tab field separator and extract the last field to get the correct mount directory. Co-Authored-By: Claude Opus 4.6 --- packaging/dmg/create-dmg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/dmg/create-dmg.sh b/packaging/dmg/create-dmg.sh index 0127da3c..87e013b6 100755 --- a/packaging/dmg/create-dmg.sh +++ b/packaging/dmg/create-dmg.sh @@ -56,7 +56,7 @@ hdiutil create \ "$TEMP_DMG" # ── Step 4: Mount and configure ────────────────────────────────────────────── -MOUNT_DIR=$(hdiutil attach "$TEMP_DMG" -readwrite -noverify | awk '/Apple_HFS/ {print substr($0, index($0, "/"))}') +MOUNT_DIR=$(hdiutil attach "$TEMP_DMG" -readwrite -noverify | awk -F'\t' '/Apple_HFS/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $NF); print $NF}') echo " Mounted at: $MOUNT_DIR" # Copy contents