Automatic installation doesn't work in Mac OS
sluchznak opened this issue · 4 comments
Hello. Thank you so match for this tool. Work perfectly. But I can't install with automatic installation.
[08:42:34] Using gulpfile ~/development/projects/vscode-explorer-git-status/gulpfile.js
[08:42:34] Starting 'minify'...
[08:42:34] Finished 'minify' after 196 ms
[08:42:34] Starting 'install'...
[08:42:34] 'install' errored after 11 ms
[08:42:34] Error: Could not locate Code binary. Please install the script manually.
at get_code_directory_paths (/Users/sluchainiyznak/development/projects/vscode-explorer-git-status/gulpfile.js:17:18)
at get_workbench_path (/Users/sluchainiyznak/development/projects/vscode-explorer-git-status/gulpfile.js:66:5)
at Gulp.gulp.task (/Users/sluchainiyznak/development/projects/vscode-explorer-git-status/gulpfile.js:118:5)
at module.exports (/Users/sluchainiyznak/development/projects/vscode-explorer-git-status/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/sluchainiyznak/development/projects/vscode-explorer-git-status/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/sluchainiyznak/development/projects/vscode-explorer-git-status/node_modules/orchestrator/index.js:214:10)
at /Users/sluchainiyznak/development/projects/vscode-explorer-git-status/node_modules/orchestrator/index.js:279:18
at finish (/Users/sluchainiyznak/development/projects/vscode-explorer-git-status/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/sluchainiyznak/development/projects/vscode-explorer-git-status/node_modules/orchestrator/lib/runTask.js:29:3)
at /Users/sluchainiyznak/development/projects/vscode-explorer-git-status/node_modules/pump/index.js:73:7
MacOS doesn't have whereis
tool, in MacOS is where
.
By default app workbench.main.js
places in /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench
.
In your tutorial missing requirements about to install command line tool: https://code.visualstudio.com/docs/setup/mac#_command-line
But where code
return /usr/local/bin/code -> /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code
Same
Will fix in a few days, thanks a lot for reporting.
This issue should be fixed now with c719488.
I gave up on trying to auto-locate workbench.main.js
. Not only it is super-ugly to do with where
or whereis
, but it does not work on OSX without executing the command inside VS Code to add "code" to PATH.
Instead, I hardcoded the default paths for each OS, including OSX. If anyone wishes to use a non-standard installation path, they should just use the manual method instead. I will update the README accordingly.
I also added the detection if the hack is already installed so it wouldn't be installed twice by accident.
Please try these changes if you can, I would very much appreciate it.
fixed and looking good!