Skip to content

Commit

Permalink
fix switch case
Browse files Browse the repository at this point in the history
  • Loading branch information
ElinorW committed Jul 11, 2024
1 parent 1b06ef6 commit fda85e1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions vscode/microsoft-kiota/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export async function activate(
);
return;
}

let languagesInformation = await getLanguageInformation(context);
const config = await generateSteps(
{
Expand All @@ -153,23 +154,24 @@ export async function activate(
);
return;
}

const settings = getExtensionSettings(extensionId);
let result;
switch (generationType) {
case GenerationType.Client:
result = await generateClientAndRefreshUI(config, settings, outputPath, selectedPaths);
break;
break;
case GenerationType.Plugin:
result = await generatePluginAndRefreshUI(config, settings, outputPath, selectedPaths);
break;
break;
case GenerationType.ApiManifest:
result = await generateManifestAndRefreshUI(config, settings, outputPath, selectedPaths);
break;
default:
await vscode.window.showErrorMessage(
vscode.l10n.t("Invalid generation type")
);
break;
return;
}

if (result && getLogEntriesForLevel(result, LogLevel.critical, LogLevel.error).length === 0) {
Expand All @@ -180,7 +182,6 @@ export async function activate(
clientClassName: config.clientClassName || config.pluginName
} as GeneratedOutputState);
if (!vscode.workspace.workspaceFolders || vscode.workspace.workspaceFolders.length === 0) {
await vscode.window.showInformationMessage('Opening a new window with the output folder as workspace.');
await vscode.commands.executeCommand('vscode.openFolder', vscode.Uri.file(outputPath), true);
} else {
await displayGenerationResults(context, openApiTreeProvider, config, outputPath);
Expand Down

0 comments on commit fda85e1

Please sign in to comment.