Skip to content
Snippets Groups Projects
Commit 4ce6616f authored by Trevor Powell's avatar Trevor Powell Committed by GitHub
Browse files

Fix "Failed to eject" errors with DMGs

Use "diskutil unmount force" to unmount DMGs.
parent 6f305ad3
No related branches found
No related tags found
No related merge requests found
......@@ -45,10 +45,10 @@ module Hbc
begin
tries ||= 2
@command.run("/usr/sbin/diskutil",
args: ["eject", mountpath],
args: ["unmount", "force", mountpath],
print_stderr: false)
raise CaskError, "Failed to eject #{mountpath}" if mountpath.exist?
raise CaskError, "Failed to unmount #{mountpath}" if mountpath.exist?
rescue CaskError => e
raise e if (tries -= 1).zero?
sleep 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment