mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-22 15:34:49 +01:00
chore : check if there's a vscode workspace before joining a codemp workspace
This commit is contained in:
parent
6dc6387a2d
commit
f4be360513
1 changed files with 4 additions and 0 deletions
|
@ -53,6 +53,10 @@ export async function join(selected: vscode.TreeItem | undefined) {
|
|||
workspace_id = await vscode.window.showInputBox({ prompt: "name of workspace to attach to" });
|
||||
}
|
||||
if (!workspace_id) return; // user cancelled with ESC
|
||||
if(vscode.workspace.getWorkspaceFolder === undefined) {
|
||||
vscode.window.showErrorMessage("Open a Workspace folder first");
|
||||
return;
|
||||
}
|
||||
workspace = await client.join_workspace(workspace_id)
|
||||
let controller = workspace.cursor();
|
||||
controller.callback(async function (controller: codemp.CursorController) {
|
||||
|
|
Loading…
Reference in a new issue