Skip to content

Instantly share code, notes, and snippets.

@satokaz
Last active February 11, 2016 16:13
Show Gist options
  • Save satokaz/1c189a5b6b7684883947 to your computer and use it in GitHub Desktop.
Save satokaz/1c189a5b6b7684883947 to your computer and use it in GitHub Desktop.
vscode-project-manager: Project switching does not work #7
diff --git a/extension.ts b/extension.ts
index 4f83f23..4107c89 100644
--- a/extension.ts
+++ b/extension.ts
@@ -144,11 +144,42 @@ export function activate() {
let openInNewWindow: boolean = vscode.workspace.getConfiguration('projectManager').get('openInNewWindow', true);
let reuseCmdOption: string = openInNewWindow ? "" : " -r";
- exec(codePath + " " + projectPath + reuseCmdOption);
+ if (process.platform == 'darwin') {
+ exec(('open' + ' -b \'com.microsoft.VSCode\' ' + projectPath + reuseCmdOption));
+ // exec(('open' + ' -a \'/Applications/Visual\ Studio\ Code.app\' ' + projectPath + reuseCmdOption));
+ } else {
+ exec(codePath + " " + projectPath + reuseCmdOption);
+ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment