expect(harness.messages).toContain("local shell: not enabled");
expect(harness.messages).toContain("local shell: not enabled for this session");
expect(harness.createSelectorSpy).toHaveBeenCalledTimes(1);
expect(harness.spawnCommand).not.toHaveBeenCalled();
});
it("sets OPENCLAW_SHELL when running local shell commands", async () => { const spawnCommand = vi.fn((_command: string, _options: unknown) => { const stdout = new EventEmitter(); const stderr = new EventEmitter(); return {
stdout,
stderr,
on: (event: string, callback: (...args: unknown[]) => void) => { if (event === "close") {
setImmediate(() => callback(0, null));
}
},
};
});
const harness = createShellHarness({
spawnCommand: spawnCommand as unknown as typeofimport("node:child_process").spawn,
env: { PATH: "/tmp/bin", USER: "dev" },
});
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.