Skip to content

Commit da2f70c

Browse files
authored
fix: resolve install.sh mount point before copying app (#36)
1 parent 3041832 commit da2f70c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/landing/public/install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ curl -fSL --progress-bar "$DOWNLOAD_URL" -o "$DMG_PATH"
3737

3838
# ── Mount & copy ──
3939
info "Installing to ${INSTALL_DIR}..."
40-
MOUNT_POINT=$(hdiutil attach "$DMG_PATH" -nobrowse -quiet | tail -1 | sed 's/.* //')
40+
MOUNT_POINT=$(hdiutil attach "$DMG_PATH" -nobrowse | tail -1 | sed 's/.* //')
41+
[[ -n "$MOUNT_POINT" ]] || err "Failed to resolve mount point."
42+
[[ -d "${MOUNT_POINT}/${APP_NAME}" ]] || err "Mounted DMG does not contain ${APP_NAME}."
4143

4244
# Remove old version if exists
4345
if [[ -d "${INSTALL_DIR}/${APP_NAME}" ]]; then
@@ -47,7 +49,7 @@ fi
4749
cp -R "${MOUNT_POINT}/${APP_NAME}" "${INSTALL_DIR}/"
4850

4951
# Unmount
50-
hdiutil detach "$MOUNT_POINT" -quiet 2>/dev/null || true
52+
hdiutil detach "$MOUNT_POINT" >/dev/null 2>&1 || true
5153

5254
# ── Cleanup ──
5355
rm -rf "$TMPDIR_INSTALL"

0 commit comments

Comments
 (0)