diff --git a/packages/core/src/runtimes/workspace-registry/node/inspect-path.ts b/packages/core/src/runtimes/workspace-registry/node/inspect-path.ts index 3ac69af13e..cd13b1f2ac 100644 --- a/packages/core/src/runtimes/workspace-registry/node/inspect-path.ts +++ b/packages/core/src/runtimes/workspace-registry/node/inspect-path.ts @@ -46,7 +46,7 @@ export async function inspectWorkspacePath( })); } catch (error) { // Exit 128 = not inside a git work tree: a plain directory, not a failure. - if (error instanceof ExecError && error.exitCode !== null) return { kind: 'directory' }; + if (error instanceof ExecError && error.exitCode === 128) return { kind: 'directory' }; return { kind: 'inspect-failed', message: error instanceof Error ? error.message : String(error),