balena-cli/patches/denymount+2.2.0.patch
Paulo Castro 6e343c36a8 Fix 'local configure' on macOS standalone installation
Resolves: #977
Resolves: #1212
Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-05-10 16:18:13 +01:00

39 lines
1.2 KiB
Diff

diff --git a/node_modules/denymount/lib/index.js b/node_modules/denymount/lib/index.js
index 93b8e59..86d53dc 100644
--- a/node_modules/denymount/lib/index.js
+++ b/node_modules/denymount/lib/index.js
@@ -24,7 +24,9 @@ var utils = require('./utils');
* @module denymount
*/
-var EXECUTABLE_PATH = path.join(__dirname, '..', 'bin', 'denymount');
+var EXECUTABLE_PATH = process.pkg
+ ? path.join(path.dirname(process.execPath), 'denymount')
+ : path.join(__dirname, '..', 'bin', 'denymount');
/**
* @summary Prevent automatic mounting of an OS X disk
diff --git a/node_modules/denymount/lib/index.js.rej b/node_modules/denymount/lib/index.js.rej
new file mode 100644
index 0000000..a2c0516
--- /dev/null
+++ b/node_modules/denymount/lib/index.js.rej
@@ -0,0 +1,17 @@
+***************
+*** 24,30 ****
+ * @module denymount
+ */
+
+- var EXECUTABLE_PATH = path.join(__dirname, '..', 'bin', 'denymount');
+
+ /**
+ * @summary Prevent automatic mounting of an OS X disk
+--- 24,30 ----
+ * @module denymount
+ */
+
++ var EXECUTABLE_PATH = path.join(path.dirname(process.execPath), 'denymount', 'bin', 'denymount');
+
+ /**
+ * @summary Prevent automatic mounting of an OS X disk