Fix "Failed to eject" errors with DMGs
Use "diskutil unmount force" to unmount DMGs.
This commit is contained in:
parent
6f305ad3dc
commit
4ce6616f2e
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user