Skip to content

Commit f8ff2e6

Browse files
committed
make setup more robust
1 parent 143d67e commit f8ff2e6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/canary-docs-preview.yml

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
restore-broccoli-cache: true
3131
jobs: 4
3232
parallel-build: true
33-
with-cert: false
3433
install: true
3534
repo-token: ${{ secrets.GITHUB_TOKEN }}
3635
- name: Install Docs Dependencies

docs-viewer/src/preview-docs.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,15 @@ async function cloneRepo(details: ReturnType<typeof repoDetails>) {
104104

105105
// if the clone fails for publicKey we try https
106106
if (exitCode !== 0) {
107-
const reason = await new Response(proc.stderr).text();
107+
const reason = await new Response(proc.stdout).text();
108108
if (reason.includes('publickey')) {
109109
log(`Cloning ${chalk.green(details.repoPath)} to ${chalk.green(relativePath)} using https`);
110110
const proc2 = Bun.spawn(['git', 'clone', details.httpsUrl, relativePath, '--depth=1'], {
111111
cwd: docsViewerRoot,
112112
});
113113
await proc2.exited;
114+
} else {
115+
throw new Error(reason);
114116
}
115117
}
116118
}

0 commit comments

Comments
 (0)