diff --git a/src/fixtures/ide.py b/src/fixtures/ide.py index 2a8e936..9a2db0d 100644 --- a/src/fixtures/ide.py +++ b/src/fixtures/ide.py @@ -57,7 +57,7 @@ def setup_vscode(vscode_config, config): vscode = VisualStudioCode() vscode_path = vscode_config["ide_path"] default_application = config["project_path"] - vscode.open_application(vscode_path, default_application) + vscode.open_application(vscode_path, default_application, True) vscode.set_default_timeout(timeout=config["timeout_in_seconds"]) time.sleep(3) yield vscode diff --git a/src/models/IDE/VisualStudioCode.py b/src/models/IDE/VisualStudioCode.py index 78b3395..d673271 100644 --- a/src/models/IDE/VisualStudioCode.py +++ b/src/models/IDE/VisualStudioCode.py @@ -22,8 +22,8 @@ def __init__(self): self.chrome = Chrome() super().__init__() - def open_application(self, vscode_path, default_application): - subprocess.run(f"{vscode_path} {default_application}", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + def open_application(self, vscode_path, default_application, trust_workspace=False): + subprocess.run(f"{vscode_path} {default_application} {'--disable-workspace-trust' if trust_workspace else ''}", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) def cmd_palette_exec_command(self, command: VSCodeCommandEnum): """