Skip to content

Commit b0179e0

Browse files
authored
Merge pull request #1029 from Kyoungwoong/feature/error-log
refac[vibe]: Git clone 에러 로그 상세히 처리
2 parents ed638d0 + 5ed490d commit b0179e0

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

packages/mcp/src/common/utils.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,21 @@ export const GitHubUtils = {
242242
);
243243

244244
if (status.code !== 0 || status.error) {
245-
throw new Error(`Git clone failed: ${stderr.toString()}`);
245+
const errorDetails: any = {
246+
exitCode: status.code,
247+
error: status.error?.message || null,
248+
stderr: stderr.toString() || '(empty)',
249+
stdout: stdout.toString() || '(empty)',
250+
};
251+
252+
if (!stderr.toString() && status.error) {
253+
errorDetails.likelyCause = 'git command not found or not executable';
254+
errorDetails.errorName = status.error.name;
255+
}
256+
257+
const errorMessage = `Git clone failed. Details: ${JSON.stringify(errorDetails, null, 2)}`;
258+
console.error('Git clone failed:', errorDetails);
259+
throw new Error(errorMessage);
246260
}
247261
},
248262

0 commit comments

Comments
 (0)