






















@@ -1,3 +1,4 @@
1+import fsSync from "node:fs";
12import fs from "node:fs/promises";
23import path from "node:path";
34import { bundledDistPluginFile } from "openclaw/plugin-sdk/test-fixtures";
@@ -152,6 +153,9 @@ describe("update global helpers", () => {
152153153154it("uses an absolute POSIX script shell for npm lifecycle scripts during global installs", async () => {
154155const platformSpy = vi.spyOn(process, "platform", "get").mockReturnValue("linux");
156+const existsSyncSpy = vi
157+.spyOn(fsSync, "existsSync")
158+.mockImplementation((candidate) => candidate === "/bin/sh");
155159try {
156160await expect(
157161createGlobalInstallEnv({
@@ -163,6 +167,7 @@ describe("update global helpers", () => {
163167NPM_CONFIG_SCRIPT_SHELL: "/bin/sh",
164168});
165169} finally {
170+existsSyncSpy.mockRestore();
166171platformSpy.mockRestore();
167172}
168173});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。