aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorTrevor Powell2017-01-22 22:52:11 -0600
committerGitHub2017-01-22 22:52:11 -0600
commit4ce6616f2eff36afb7ed3effc35f7ee0c108e266 (patch)
tree6ff8b56a6f8faba1f0c3fe7eb5adac4b1bdb9c0a /Library
parent6f305ad3dcd01a21b5c5836339338eeb47a239cf (diff)
downloadbrew-4ce6616f2eff36afb7ed3effc35f7ee0c108e266.tar.bz2
Fix "Failed to eject" errors with DMGs
Use "diskutil unmount force" to unmount DMGs.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/container/dmg.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/container/dmg.rb b/Library/Homebrew/cask/lib/hbc/container/dmg.rb
index 987455ad7..49543844a 100644
--- a/Library/Homebrew/cask/lib/hbc/container/dmg.rb
+++ b/Library/Homebrew/cask/lib/hbc/container/dmg.rb
@@ -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