balena-cli/patches/all/open+7.4.2.patch

17 lines
549 B
Diff
Raw Normal View History

diff --git a/node_modules/open/index.js b/node_modules/open/index.js
index 13147d0..ff161dd 100644
--- a/node_modules/open/index.js
+++ b/node_modules/open/index.js
@@ -10,7 +10,10 @@ const pAccess = promisify(fs.access);
const pReadFile = promisify(fs.readFile);
// Path to included `xdg-open`.
-const localXdgOpenPath = path.join(__dirname, 'xdg-open');
+const localXdgOpenPath = process.pkg
+ ? path.join(path.dirname(process.execPath), 'xdg-open')
+ : path.join(__dirname, 'xdg-open');
+
/**
Get the mount point for fixed drives in WSL.