noobs 0.0.178 → 0.0.179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/noobs.node +0 -0
- package/index.js +14 -2
- package/package.json +1 -1
package/dist/noobs.node
CHANGED
|
Binary file
|
package/index.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// Path to the OBS binaries. We want this to come first so that the correct
|
|
4
|
+
// DLLs are loaded. It's possible other copies are on the system PATH already.
|
|
5
|
+
let binPath = path
|
|
4
6
|
.resolve(__dirname, 'dist', 'bin')
|
|
5
7
|
.replace('app.asar', 'app.asar.unpacked');
|
|
6
8
|
|
|
9
|
+
if (process.env.PATH) {
|
|
10
|
+
// Almost certainly there is an existing PATH. We don't want to drop
|
|
11
|
+
// things off the path as it might make other things fail.
|
|
12
|
+
binPath += ';';
|
|
13
|
+
binPath += process.env.PATH;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Now set the updated PATH for this process.
|
|
17
|
+
process.env.Path = binPath;
|
|
18
|
+
|
|
7
19
|
const packageName = 'noobs.node';
|
|
8
20
|
const noobs = require(`./dist/${packageName}`);
|
|
9
|
-
module.exports = noobs;
|
|
21
|
+
module.exports = noobs;
|