fix: install script mount point parsing#34
Merged
jcanizalez merged 1 commit intomainfrom Mar 15, 2026
Merged
Conversation
The hdiutil attach output parsing used awk '{print $NF}' which only
captures the last space-separated field. Volume names like
"VibeGrid 0.1.0-arm64" broke the mount path extraction. Switch to
sed + grep to capture the full /Volumes/... path.
There was a problem hiding this comment.
Pull request overview
Updates the macOS installer script’s DMG mount-point detection to be more tolerant of hdiutil attach output variations.
Changes:
- Adjusted
hdiutil attachoutput parsing to extract a/Volumes/...path viagrep/sed(instead oftail/awk).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
|
||
| echo "Mounting DMG..." | ||
| MOUNT_POINT="$(hdiutil attach "${TMPDIR_INSTALL}/${ARTIFACT}" -nobrowse -quiet | tail -1 | awk '{print $NF}')" | ||
| MOUNT_POINT="$(hdiutil attach "${TMPDIR_INSTALL}/${ARTIFACT}" -nobrowse -quiet | grep '/Volumes/' | sed 's/.*\(\/Volumes\/.*\)/\1/' | head -1)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hdiutil attachoutput parsing that broke when DMG volume names contain spaces (e.g., "VibeGrid 0.1.0-arm64")awk '{print $NF}'withgrep + sedto capture the full/Volumes/...pathTest plan
curl -fsSL https://raw.githubusercontent.com/jcanizalez/vibegrid/main/install.sh | shon macOS arm64