Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS-bundler: unmount old dmg when building #1571

Closed
lucaheise opened this issue Apr 21, 2021 · 1 comment
Closed

macOS-bundler: unmount old dmg when building #1571

lucaheise opened this issue Apr 21, 2021 · 1 comment

Comments

@lucaheise
Copy link

When (re)building the binarys the Build-Script will fail if the previouly build .dmg file is still mounted.

Steps to reproduce the behavior:

  1. Build the binarys
  2. Open the .dmg file
  3. Close the file (Closing won't actually unmount it)
  4. Build again

Expected behavior
I think there should be an exception preventing this.
Either it should check if previously the created .dmg is still mounted and exit with corresponding error-message or (better) it should try to unmount it.

While building the script will actually mount the new .dmg file and unmount it again. So unmounting it with the same process as in tauri/tooling/bundler/src/bundle/templates/dmg/bundle_dmg Line 360 should be possible as long as names dont change.

# unmount
echo "Unmounting disk image..."
hdiutil detach "${DEV_NAME}"

OS: macOS 11.2.3 / M1
Node: 15.12.0
NPM: 7.6.3
Rustc: 1.51.0

@lucasfernog
Copy link
Member

Do you think you can make a PR fixing this? 🥺

lucasfernog added a commit that referenced this issue May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants