Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(desktop): make the login-shell PATH probe pass typecheck

zhangqingkun9767b53aba61b36
diff --git a/apps/desktop/electron/main/user-login-path.ts b/apps/desktop/electron/main/user-login-path.ts
index c3912f918..8fdcf812e 100644
--- a/apps/desktop/electron/main/user-login-path.ts
+++ b/apps/desktop/electron/main/user-login-path.ts
@@ -25,7 +25,8 @@ export function resetUserLoginPathCacheForTests(): void {
function defaultProbe(): string | undefined {
if (process.platform === "win32") return undefined;
const shell = [process.env.SHELL, "/bin/zsh", "/bin/bash", "/bin/sh"].find(
- (candidate): candidate is string => Boolean(candidate) && existsSync(candidate),
+ (candidate): candidate is string =>
+ typeof candidate === "string" && existsSync(candidate),
);
if (!shell) return undefined;
try {