Skip to content

Commit 143d67e

Browse files
committed
fix: use correct exitCode determination
1 parent af50b00 commit 143d67e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs-viewer/src/preview-docs.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ async function cloneRepo(details: ReturnType<typeof repoDetails>) {
100100
const proc = Bun.spawn(['git', 'clone', details.gitUrl, relativePath, '--depth=1'], {
101101
cwd: docsViewerRoot,
102102
});
103-
await proc.exited;
103+
const exitCode = await proc.exited;
104104

105105
// if the clone fails for publicKey we try https
106-
if (proc.exitCode !== 0) {
106+
if (exitCode !== 0) {
107107
const reason = await new Response(proc.stderr).text();
108108
if (reason.includes('publickey')) {
109109
log(`Cloning ${chalk.green(details.repoPath)} to ${chalk.green(relativePath)} using https`);

0 commit comments

Comments
 (0)