Skip to content

Commit 8c87493

Browse files
Don't offer existing databases if there aren't any
1 parent 0f4a778 commit 8c87493

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

extensions/ql-vscode/src/databases/local-databases-ui.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,12 @@ export class DatabaseUI extends DisposableObject {
828828
}
829829

830830
private async promptForDatabase(): Promise<void> {
831+
// If there aren't any existing databases,
832+
// don't bother asking the user if they want to pick one.
833+
if (this.databaseManager.databaseItems.length === 0) {
834+
return this.importNewDatabase();
835+
}
836+
831837
const quickPickItems: DatabaseSelectionQuickPickItem[] = [
832838
{
833839
label: "$(database) Existing database",

0 commit comments

Comments
 (0)