Jarred-Sumner / git-peek

git repo to local editor instantly
MIT License
716 stars 17 forks source link

VS Code does not open on Windows #2

Closed Coteh closed 3 years ago

Coteh commented 3 years ago

Node v12.18.4 NPM 6.14.6 Windows 10

λ git-peek.cmd https://github.com/webrtc/samples.git
� Launched editor in 0.26s
Error: Command failed: /c/Users/JamesCote/AppData/Local/Programs/Microsoft VS Code/bin/code --wait "C:\Users\JAMESC~1\AppData\Local\Temp\tmp-10752-xVz6CmmhvAv0" --new-window -g "C:\Users\JAMESC~1\AppData\Local\Temp\tmp-10752-xVz6CmmhvAv0\README.md":0:0
The system cannot find the path specified.

    at ChildProcess.exithandler (child_process.js:303:12)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 
{
  killed: false,
  code: 1,
  signal: null,
  cmd: '/c/Users/JamesCote/AppData/Local/Programs/Microsoft VS Code/bin/code 
--wait "C:\\Users\\JAMESC~1\\AppData\\Local\\Temp\\tmp-10752-xVz6CmmhvAv0" --new-window -g "C:\\Users\\JAMESC~1\\AppData\\Local\\Temp\\tmp-10752-xVz6CmmhvAv0\\README.md":0:0'
}
Error: Command failed: /c/Users/JamesCote/AppData/Local/Programs/Microsoft VS Code/bin/code --wait "C:\Users\JAMESC~1\AppData\Local\Temp\tmp-10752-xVz6CmmhvAv0" --new-window -g "C:\Users\JAMESC~1\AppData\Local\Temp\tmp-10752-xVz6CmmhvAv0\README.md":0:0
The system cannot find the path specified.

    at ChildProcess.exithandler (child_process.js:303:12)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
Jarred-Sumner commented 3 years ago

I'll fix it, thanks for reporting

Jarred-Sumner commented 3 years ago

fixed and published "version": "1.1.9", the problem was running which which is called where in Windows (and has different syntax). I replaced that call with the which npm package.