mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
update new workspace validation to throw errors to make code more reusable (#13856)
This commit is contained in:
@@ -43,9 +43,9 @@ export class NewProjectDialog extends DialogBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
const sameFolderAsNewProject = path.join(this.model.location, this.model.name) === path.dirname(this.workspaceInputBox!.value!);
|
||||
if (this.workspaceInputBox!.enabled && !await this.validateNewWorkspace(sameFolderAsNewProject)) {
|
||||
return false;
|
||||
if (this.workspaceInputBox!.enabled) {
|
||||
const sameFolderAsNewProject = path.join(this.model.location, this.model.name) === path.dirname(this.workspaceInputBox!.value!);
|
||||
await this.validateNewWorkspace(sameFolderAsNewProject);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user