boosted-cli 0.2.0 → 0.2.1
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/npm/launcher.mjs +9 -5
- package/package.json +1 -1
package/npm/launcher.mjs
CHANGED
|
@@ -114,13 +114,17 @@ export async function installBinary({
|
|
|
114
114
|
return binary;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
export
|
|
118
|
-
|
|
119
|
-
const child = spawn(binary, argv, {
|
|
117
|
+
export function spawnOptions(env = process.env) {
|
|
118
|
+
return {
|
|
120
119
|
env,
|
|
121
120
|
stdio: "inherit",
|
|
122
|
-
windowsHide:
|
|
123
|
-
}
|
|
121
|
+
windowsHide: true,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export async function run({ argv = process.argv.slice(2), env = process.env } = {}) {
|
|
126
|
+
const binary = await installBinary({ env });
|
|
127
|
+
const child = spawn(binary, argv, spawnOptions(env));
|
|
124
128
|
|
|
125
129
|
await new Promise((resolve, reject) => {
|
|
126
130
|
child.once("error", reject);
|