Skip to content

Commit 47af8da

Browse files
chore: friendlier error when default clone fails
1 parent b7c16d0 commit 47af8da

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/utils/agent-scaffold/manifest.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,15 @@ function loadExternalManifestSync(source: string): {
8181
sourceRoot: string;
8282
} {
8383
const tmpDir = fs.mkdtempSync(path.join(require('os').tmpdir(), 'fc-agent-'));
84-
cloneRepo(source, tmpDir);
84+
try {
85+
cloneRepo(source, tmpDir);
86+
} catch {
87+
// Default remote is public once launched; until then, gh auth covers
88+
// insiders and everyone else sees this hint.
89+
throw new Error(
90+
`Could not clone ${source}. If the repo isn't public yet, authenticate with \`gh auth login\` or set GITHUB_TOKEN. Otherwise, check your network / git install.`
91+
);
92+
}
8593
const manifestPath = path.join(tmpDir, 'agent-manifest.json');
8694
if (!fs.existsSync(manifestPath)) {
8795
// Upstream currently ships the manifest at `.internal/cli/agent-manifest.json`.

0 commit comments

Comments
 (0)