it("anchors Windows npm staging to the adjacent npm-cli.js without a shell", () => { const execPath = "C:\\nodejs\\node.exe"; const expectedNpmCliPath = path.win32.resolve(
path.win32.dirname(execPath), "node_modules/npm/bin/npm-cli.js",
);
it("uses an adjacent npm.exe on Windows without a shell", () => { const execPath = "C:\\nodejs\\node.exe"; const expectedNpmExePath = path.win32.resolve(path.win32.dirname(execPath), "npm.exe");
it("prefixes PATH with the active node dir when falling back to bare npm", () => {
expect(
resolveNpmRunner({
execPath: "/tmp/node",
env: {
PATH: "/usr/bin:/bin",
},
existsSync: () => false,
platform: "linux",
}),
).toEqual({
command: "npm",
args: [],
shell: false,
env: {
PATH: `/tmp${path.delimiter}/usr/bin:/bin`,
},
});
});
it("fails closed on Windows when no toolchain-local npm CLI exists", () => {
expect(() =>
resolveNpmRunner({
execPath: "C:\\node\\node.exe",
env: {
Path: "C:\\Windows\\System32",
},
existsSync: () => false,
platform: "win32",
}),
).toThrow("OpenClaw refuses to shell out to bare npm on Windows");
});
});
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.