sadesyllas / vscode-workspace-switcher

Easily switch between workspaces
GNU General Public License v3.0
28 stars 8 forks source link

Worspace load fails #5

Closed lukaszlukasiewicz closed 6 years ago

lukaszlukasiewicz commented 6 years ago

I get this message when I try to save or switch workspace:

Command failed: code -r D:\vs-code-workspaces\test.code-workspace

But workspace files are saved and they are correct (normal open wokspace command works).

Info from developer console:

Command failed: code -r D:\code_ws\test.code-workspace D:\code_ws\test.code-workspace:1 (function (exports, require, module, filename, dirname, process, global, Buffer) { return function (exports, require, module, filename, dirname) { {"folders":[{"path":"e:\test"}],"settings":{}} ^ SyntaxError: Unexpected token :

at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at Function.Module._preloadModules (module.js:665:12)
at preloadModules (bootstrap_node.js:404:38)

Windows 10, VSCode 1.18.1. Plugin ver: 1.4.0

redfellow commented 6 years ago

Same here. Works with code-insiders, but with regular code the switch fails.

ugurozturk commented 6 years ago

@lukaszlukasiewicz @rnyberg check that. https://github.com/sadesyllas/vscode-workspace-switcher/issues/1

redfellow commented 6 years ago

Yeah, "vscodeWorkspaceSwitcher.codeExecutable": "C:\\Program Files\\Microsoft VS Code\\bin\\code.cmd", in my settings worked.

sadesyllas commented 6 years ago

@lukaszlukasiewicz, has the above proposed solution worked for you?

lukaszlukasiewicz commented 6 years ago

Yes it does. Sorry about the delay. After adding this path to the settings: "vscodeWorkspaceSwitcher.codeExecutable" : "C:\\Program Files (x86)\\Microsoft VS Code\\bin\\code.cmd", It started working.