Skip to content

Commit fe3bfb7

Browse files
fredzqmjoehan
andauthored
Fix a minor bug when CLI prompts for location service even when a existing data connect service is picked (#7291)
* fix a bug whenit prompts for location service is chosen and new instance is chosen * m * format --------- Co-authored-by: Joe Hanley <joehanley@google.com>
1 parent 565c16b commit fe3bfb7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

firebase-vscode/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## NEXT
1+
## NEXT
22

33
## 0.2.6
44

src/init/features/dataconnect/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ async function promptForCloudSQLInstance(setup: Setup, info: RequiredInfo): Prom
192192
type: "list",
193193
choices,
194194
});
195-
info.locationId = choices.find((c) => c.value === info.cloudSqlInstanceId)!.location;
195+
if (info.cloudSqlInstanceId !== "") {
196+
// Infer location if a CloudSQL instance is chosen.
197+
info.locationId = choices.find((c) => c.value === info.cloudSqlInstanceId)!.location;
198+
}
196199
}
197200
}
198201
if (info.cloudSqlInstanceId === "") {

0 commit comments

Comments
 (0)