Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't open new code window on linux mint 17.3 - code: bad option: -n #1

Closed
blamarche opened this issue Mar 28, 2016 · 11 comments
Closed
Assignees
Labels
Milestone

Comments

@blamarche
Copy link

Is anyone else having this issue? It refuses to run the new code instance and I get the following error:

[Plugin Host] Error: Command failed: /bin/sh -c code -n "/go/src/github.com/blamarche/assemble-web-chat"
code: bad option: -n

    at ChildProcess.exithandler (child_process.js:215:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)  code: bad option: -n
@felipecaputo
Copy link
Owner

Hi @blamarche , I'll check that as soon as I get home.

@felipecaputo felipecaputo self-assigned this Mar 28, 2016
@martinpengellyphillips
Copy link
Contributor

I'm getting a similar error on Windows 10:

[Plugin Host] Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "code -n "C:\Users\Martin\data\identities\personal\project\lucidity""

    at ChildProcess.exithandler (child_process.js:215:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)  
threadService.ts:199 [Plugin Host] -> null  

@felipecaputo felipecaputo added this to the 0.1.4 milestone Mar 31, 2016
@felipecaputo
Copy link
Owner

I will fix the behavior for windows tonight but, in Linux there is a problem with the code executing with child_process, I've tried with Insiders .deb package and worked

felipecaputo added a commit that referenced this issue Apr 1, 2016
@felipecaputo
Copy link
Owner

I've tried but still not working with linux, it starts a node app instead of code

@martinpengellyphillips Could you please test again in your windows 10 with 0.1.4 ?

@martinpengellyphillips
Copy link
Contributor

@felipecaputo Thanks for looking into this. Still getting an error and no project being opened on Windows 10 with 0.1.4

[Plugin Host] Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "code "C:\Users\Martin\data\identities\personal\project\lucidity" -r"

    at ChildProcess.exithandler (child_process.js:215:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

Could it be related to alefragnani/vscode-project-manager#7 at all where the path to code had to be set manually to the code.cmd script?

@martinpengellyphillips
Copy link
Contributor

Been testing a little more locally and it does appear that when launching code from terminal with C:\Program Files (x86)\Microsoft VS Code\bin present in PATH then the opening of projects works as expected. That path points to the folder holding code.cmd not Code.exe.

When that path is not set then error occurs. Launching Code.exe directly from desktop also exhibits the issue.

@martinpengellyphillips
Copy link
Contributor

I've put up a PR #3 with a potential fix for the Windows issue at least.

@felipecaputo
Copy link
Owner

Thx @martinpengellyphillips

@felipecaputo
Copy link
Owner

@blamarche I've tested this a lot, and it seems that in Linux the current code version is having some problems in being executed via child_process.exec, child_process.execFile and child_process.spawn.

I've testes with code-insiders and it works. So with the PR #3 in version 1.5 that I will finish the documentation to release it tonight it will work with code insiders but not with code itself.

Do you believe it solves this issue?

@felipecaputo felipecaputo modified the milestones: 0.1.5, 0.1.4 Apr 5, 2016
@blamarche
Copy link
Author

Yes. I have done a little testing and it seems to be a vscode issue :)

Thanks!

@felipecaputo
Copy link
Owner

Version 0.1.5 released

felipecaputo pushed a commit that referenced this issue Sep 18, 2018
Fix extension pointing at wrong config folder in VSCode-OSS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants