Skip to content

Commit 14cd7fc

Browse files
yhxiangclaude
andcommitted
fix: propagate real error when machineBash fails in createWorktree
createWorktree unconditionally reported "Not a Git repository" for any machineBash failure, hiding RPC errors and network issues. Now checks exitCode === -1 (RPC/communication failure) and forwards the real error. Fixes #1110 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ea41c4c commit 14cd7fc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/happy-app/sources/utils/worktree.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export async function createWorktree(
5555
success: false,
5656
worktreePath: '',
5757
branchName: '',
58-
error: 'Not a Git repository'
58+
error: gitCheck.exitCode === -1
59+
? (gitCheck.stderr || 'Failed to reach machine')
60+
: 'Not a Git repository'
5961
};
6062
}
6163

0 commit comments

Comments
 (0)