Skip to content
Permalink
Browse files

fix(appdmg): use `hdiutil detach -force`

  • Loading branch information...
devinus committed Jan 28, 2019
1 parent 2a9ebdf commit 28e87489ad2bdb74d8b51a40ca48e2e4604a559f
Showing with 8 additions and 8 deletions.
  1. +8 −8 patches/appdmg+0.5.2.patch
@@ -1,13 +1,13 @@
diff --git a/node_modules/appdmg/lib/hdiutil.js b/node_modules/appdmg/lib/hdiutil.js
index e712705..151209b 100644
index e712705..8e55732 100644
--- a/node_modules/appdmg/lib/hdiutil.js
+++ b/node_modules/appdmg/lib/hdiutil.js
@@ -64,7 +64,7 @@ exports.detach = function (path, cb) {
const args = ['detach', path]
@@ -61,7 +61,7 @@ exports.attach = function (path, cb) {
}

exports.detach = function (path, cb) {
- const args = ['detach', path]
+ const args = ['detach', path, '-force']

util.sh('hdiutil', args, function (err) {
- if (err && err.exitCode === 16 && /Resource busy/.test(err.stderr)) {
+ if (err && err.code === 16 && /Resource busy/.test(err.stderr)) {
setTimeout(function () {
util.sh('hdiutil', args, (err) => cb(err))
}, 1000)
if (err && err.exitCode === 16 && /Resource busy/.test(err.stderr)) {

0 comments on commit 28e8748

Please sign in to comment.
You can’t perform that action at this time.