Skip to content

Commit

Permalink
Fix bug where connection single repository properly prompted. (#6596)
Browse files Browse the repository at this point in the history
  • Loading branch information
taeold authored Dec 7, 2023
1 parent 98ad871 commit e4158cf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/init/features/frameworks/repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,12 @@ async function promptRepositoryUri(
for (const conn of connections) {
const { id } = parseConnectionName(conn.name)!;
const resp = await gcb.fetchLinkableRepositories(projectId, location, id);
if (resp.repositories && resp.repositories.length > 1) {
if (resp.repositories && resp.repositories.length > 0) {
for (const repo of resp.repositories) {
remoteUriToConnection[repo.remoteUri] = conn;
}
}
}

const choices = Object.keys(remoteUriToConnection).map((remoteUri: string) => ({
name: extractRepoSlugFromUri(remoteUri) || remoteUri,
value: remoteUri,
Expand Down

0 comments on commit e4158cf

Please sign in to comment.