mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 22:34:32 +00:00
test: make shell-env trust-path test platform-safe (#24991) (thanks @stakeswky)
This commit is contained in:
@@ -199,8 +199,11 @@ describe("shell env fallback", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("uses SHELL when it is explicitly registered in /etc/shells", () => {
|
it("uses SHELL when it is explicitly registered in /etc/shells", () => {
|
||||||
withEtcShells(["/bin/sh", "/usr/bin/zsh-trusted"], () => {
|
const trustedShell =
|
||||||
const trustedShell = "/usr/bin/zsh-trusted";
|
process.platform === "win32"
|
||||||
|
? "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
|
||||||
|
: "/usr/bin/zsh-trusted";
|
||||||
|
withEtcShells(["/bin/sh", trustedShell], () => {
|
||||||
const { res, exec } = runShellEnvFallbackForShell(trustedShell);
|
const { res, exec } = runShellEnvFallbackForShell(trustedShell);
|
||||||
|
|
||||||
expect(res.ok).toBe(true);
|
expect(res.ok).toBe(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user