Skip to content

Commit

Permalink
add param to trust workspace (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
midays authored May 9, 2024
1 parent 2149174 commit 2a78840
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/fixtures/ide.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/models/IDE/VisualStudioCode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit 2a78840

Please sign in to comment.