Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
fix(appdmg): use hdiutil detach -force
Browse files Browse the repository at this point in the history
  • Loading branch information
devinus committed Jan 28, 2019
1 parent 2a9ebdf commit 28e8748
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions patches/appdmg+0.5.2.patch
Original file line number Diff line number Diff line change
@@ -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.