From 28e87489ad2bdb74d8b51a40ca48e2e4604a559f Mon Sep 17 00:00:00 2001 From: Devin Alexander Torres Date: Mon, 28 Jan 2019 01:18:47 -0600 Subject: [PATCH] fix(appdmg): use `hdiutil detach -force` --- patches/appdmg+0.5.2.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/patches/appdmg+0.5.2.patch b/patches/appdmg+0.5.2.patch index d2e2598c..1f3a8f8a 100644 --- a/patches/appdmg+0.5.2.patch +++ b/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)) {