Skip to content

Commit 8980aab

Browse files
committed
Split flows for checking existing extension pack
1 parent 5d83ac8 commit 8980aab

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

extensions/ql-vscode/src/data-extensions-editor/extension-pack-picker.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ async function autoCreateExtensionPack(
339339
}
340340

341341
const existingExtensionPackPaths = extensionPacksInfo[packName];
342+
// If there is already an extension pack with this name, use it if it is valid
342343
if (existingExtensionPackPaths?.length === 1) {
343344
let extensionPack: ExtensionPack;
344345
try {
@@ -358,7 +359,11 @@ async function autoCreateExtensionPack(
358359
}
359360

360361
return extensionPack;
361-
} else if (existingExtensionPackPaths?.length > 1) {
362+
}
363+
364+
// If there is already an existing extension pack with this name, but it resolves
365+
// to multiple paths, then we can't use it
366+
if (existingExtensionPackPaths?.length > 1) {
362367
void showAndLogErrorMessage(
363368
logger,
364369
`Extension pack ${packName} resolves to multiple paths`,

0 commit comments

Comments
 (0)