mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:10:45 +00:00
fix: hide bundled runtime npm windows
This commit is contained in:
@@ -817,6 +817,7 @@ export function runBundledPluginPostinstall(params = {}) {
|
||||
encoding: "utf8",
|
||||
env: npmRunner.env ?? installEnv,
|
||||
stdio: "pipe",
|
||||
windowsHide: true,
|
||||
shell: npmRunner.shell,
|
||||
windowsVerbatimArguments: npmRunner.windowsVerbatimArguments,
|
||||
});
|
||||
|
||||
@@ -877,13 +877,15 @@ function runNpmInstall(params) {
|
||||
npm_config_save: "false",
|
||||
npm_config_yes: "true",
|
||||
};
|
||||
const result = spawnSync(params.npmRunner.command, params.npmRunner.args, {
|
||||
const runSpawnSync = params.spawnSyncImpl ?? spawnSync;
|
||||
const result = runSpawnSync(params.npmRunner.command, params.npmRunner.args, {
|
||||
cwd: params.cwd,
|
||||
encoding: "utf8",
|
||||
env: npmEnv,
|
||||
shell: params.npmRunner.shell,
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
timeout: params.timeoutMs ?? 5 * 60 * 1000,
|
||||
windowsHide: true,
|
||||
windowsVerbatimArguments: params.npmRunner.windowsVerbatimArguments,
|
||||
});
|
||||
if (result.status === 0) {
|
||||
@@ -1240,6 +1242,10 @@ export function stageBundledPluginRuntimeDeps(params = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
export const __testing = {
|
||||
runNpmInstall,
|
||||
};
|
||||
|
||||
if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) {
|
||||
stageBundledPluginRuntimeDeps();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user