Skip to content

Commit d4f10d4

Browse files
centdixclaude
andauthored
fix: handle missing direnv binary in lifecycle hook runner (#89)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4a80173 commit d4f10d4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

backend/src/adapters/hooks.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ function buildErrorMessage(
2525
}
2626

2727
function hasDirenv(): boolean {
28-
return Bun.spawnSync(["direnv", "version"], { stdout: "pipe", stderr: "pipe" }).exitCode === 0;
28+
try {
29+
return Bun.spawnSync(["direnv", "version"], { stdout: "pipe", stderr: "pipe" }).exitCode === 0;
30+
} catch {
31+
return false;
32+
}
2933
}
3034

3135
export class BunLifecycleHookRunner implements LifecycleHookRunner {

0 commit comments

Comments
 (0)