Skip to content

Commit

Permalink
🐛 Fix error message when no workspace selected (#163)
Browse files Browse the repository at this point in the history
Resolves #144

Signed-off-by: Ian Bolton <[email protected]>
  • Loading branch information
ibolton336 authored Dec 13, 2024
1 parent d77c244 commit f9aa5b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ let extension: VsCodeExtension | undefined;

export function activate(context: vscode.ExtensionContext): void {
try {
if (!vscode.workspace.workspaceFolders || vscode.workspace.workspaceFolders.length === 0) {
vscode.window.showErrorMessage("Please open a workspace folder before using this extension.");
return;
}
extension = new VsCodeExtension(context);
} catch (error) {
console.error("Failed to activate Konveyor extension:", error);
Expand Down

0 comments on commit f9aa5b6

Please sign in to comment.