diff --git a/src/ansys/tools/installer/vscode.py b/src/ansys/tools/installer/vscode.py index 91693ea3..f0be5888 100644 --- a/src/ansys/tools/installer/vscode.py +++ b/src/ansys/tools/installer/vscode.py @@ -115,9 +115,9 @@ def _open_vscode(self): """Open VS code from path.""" # handle errors path = self.vscode_window_path_config_edit.text().strip() - if os.path.exists(path): + if os.path.exists(rf"{path}"): error_msg = "echo Failed to launch vscode. Try reinstalling code by following this link https://code.visualstudio.com/download" - self._parent.launch_cmd(f"code {path} && exit 0 || {error_msg}") + self._parent.launch_cmd(f'code "{path}" && exit 0 || {error_msg}') self.user_confirmation_form.close() self._parent.vscode_window.close()