mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 04:01:23 +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", () => {
|
||||
withEtcShells(["/bin/sh", "/usr/bin/zsh-trusted"], () => {
|
||||
const trustedShell = "/usr/bin/zsh-trusted";
|
||||
const trustedShell =
|
||||
process.platform === "win32"
|
||||
? "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
|
||||
: "/usr/bin/zsh-trusted";
|
||||
withEtcShells(["/bin/sh", trustedShell], () => {
|
||||
const { res, exec } = runShellEnvFallbackForShell(trustedShell);
|
||||
|
||||
expect(res.ok).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user