mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:20:44 +00:00
fix: hide bundled runtime npm windows
This commit is contained in:
@@ -79,6 +79,7 @@ describe("bundled plugin postinstall", () => {
|
||||
},
|
||||
shell: false,
|
||||
stdio: "pipe",
|
||||
windowsHide: true,
|
||||
windowsVerbatimArguments: undefined,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
__testing as stageBundledPluginRuntimeDepsTesting,
|
||||
collectRuntimeDependencyInstallManifest,
|
||||
collectRuntimeDependencyInstallSpecs,
|
||||
stageBundledPluginRuntimeDeps,
|
||||
@@ -129,6 +130,31 @@ describe("stageBundledPluginRuntimeDeps", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("hides npm child windows during fallback runtime installs", () => {
|
||||
const spawnSyncImpl = vi.fn(() => ({ status: 0, stderr: "", stdout: "" }));
|
||||
|
||||
stageBundledPluginRuntimeDepsTesting.runNpmInstall({
|
||||
cwd: "C:\\openclaw\\dist\\extensions\\telegram\\.openclaw-install-stage",
|
||||
npmRunner: {
|
||||
command: "npm.cmd",
|
||||
args: ["install", "--silent"],
|
||||
env: { PATH: "C:\\node" },
|
||||
shell: false,
|
||||
windowsVerbatimArguments: true,
|
||||
},
|
||||
spawnSyncImpl,
|
||||
});
|
||||
|
||||
expect(spawnSyncImpl).toHaveBeenCalledWith(
|
||||
"npm.cmd",
|
||||
["install", "--silent"],
|
||||
expect.objectContaining({
|
||||
windowsHide: true,
|
||||
windowsVerbatimArguments: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("skips restaging when runtime deps stamp matches the sanitized manifest", () => {
|
||||
const { pluginDir, repoRoot } = createBundledPluginFixture({
|
||||
packageJson: {
|
||||
|
||||
Reference in New Issue
Block a user