We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 087c2bb commit b97bfa8Copy full SHA for b97bfa8
src/env.js
@@ -19,4 +19,7 @@
19
20
"use strict";
21
22
+const path = require('path');
23
+
24
global.UTIL = require('./util');
25
+global.IS_PKG = !path.basename(process.execPath).startsWith('node');
src/util.js
@@ -31,7 +31,10 @@ function _remove_undefined(arr) {
31
}
32
33
/* Return plugin directory */
34
-function plugin_dir() { return path.join(__dirname, '..'); }
+function plugin_dir() {
35
+ let root = (IS_PKG) ? process.execPath : __dirname;
36
+ return path.join(root, '..');
37
+}
38
39
/**
40
* Define flag with proper alias flag.
0 commit comments