mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 15:28:27 +00:00
test: make shell env path cache tests platform deterministic
This commit is contained in:
@@ -140,11 +140,13 @@ export function getShellPathFromLoginShell(opts: {
|
||||
env: NodeJS.ProcessEnv;
|
||||
timeoutMs?: number;
|
||||
exec?: typeof execFileSync;
|
||||
platform?: NodeJS.Platform;
|
||||
}): string | null {
|
||||
if (cachedShellPath !== undefined) {
|
||||
return cachedShellPath;
|
||||
}
|
||||
if (process.platform === "win32") {
|
||||
const platform = opts.platform ?? process.platform;
|
||||
if (platform === "win32") {
|
||||
cachedShellPath = null;
|
||||
return cachedShellPath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user