Skip to content

Commit

Permalink
fix(install): show error when installing in window without workspace (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Nov 27, 2023
1 parent a826582 commit 49f74d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ import { TestModel } from './testModel';

export async function installPlaywright(vscode: vscodeTypes.VSCode) {
const [workspaceFolder] = vscode.workspace.workspaceFolders || [];
if (!workspaceFolder)
if (!workspaceFolder) {
await vscode.window.showErrorMessage('Please open a folder in VS Code to initialize Playwright. Either an empty folder or a folder with an existing package.json.');
return;
}
const hasQuickPickSeparator = parseFloat(vscode.version) >= 1.64;
const options: vscodeTypes.QuickPickItem[] = [];
if (hasQuickPickSeparator)
Expand Down

0 comments on commit 49f74d2

Please sign in to comment.