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

dnx run command fails when user home directory contains space. #28

Closed
jrieken opened this issue Feb 3, 2016 · 17 comments
Closed

dnx run command fails when user home directory contains space. #28

jrieken opened this issue Feb 3, 2016 · 17 comments

Comments

@jrieken
Copy link
Contributor

jrieken commented Feb 3, 2016

From @retk on February 3, 2016 14:40

Hi!
Unfortunately my home directory contains a space character: 'C:\Users\Ersek Attila'

When I try to run any asp.net core application with the dnx run web command, i get the following error in the command window:
'C:\Users\Ersek' is not recognized as an internal or external command,...

vscode version: 0.10.6

Copied from original issue: microsoft/vscode#2674

@attilaersek
Copy link

There's already a pull request for the run-in-terminal package that fixes this issue on a lower level:
microsoft/run-in-terminal#2

@jtsom
Copy link

jtsom commented Mar 17, 2016

Any idea when a fix will be made so it get through to VS Code? Using dnx commands are impossible through VS Code until this is corrected, making VSCode useless for targeting .NET Core on Windows.

@egamma
Copy link
Contributor

egamma commented Apr 14, 2016

@retk the PR has been merged.

Ping @DustinCampbell @davidfowl

@jtsom
Copy link

jtsom commented Apr 14, 2016

And what is necessary to get this to actually be in VS Code?

@jrieken
Copy link
Contributor Author

jrieken commented Apr 14, 2016

the [email protected] contains the fix and omnisharp ships with that version of the extension. There might be another issue somewhere along the way.

@DustinCampbell
Copy link
Member

Omnisharp doesn't ship with run-in-terminal -- did you mean the C# Extension?

@jrieken
Copy link
Contributor Author

jrieken commented Apr 14, 2016

Yeah, I meant the extension

@jtsom
Copy link

jtsom commented Apr 14, 2016

Either way... it's not in VS Code :)

@attilaersek
Copy link

run-in-terminal is in package dependencies

  "dependencies": {
   ...
    "run-in-terminal": "*",
   ...
  },

although as @jrieken mentioned there might be another issues too

@jtsom
Copy link

jtsom commented Apr 14, 2016

Well, then I've opened a new issue on VS Code. If the dependencies have been fixed, then something in Code is broken.

@jtsom
Copy link

jtsom commented Apr 20, 2016

And it was closed and moved back here.

Is anyone going to take this up and make sure it gets to VS Code??? I don't even know where the problem is anymore... VS Code? OmniSharp? run-in-terminal? Everyone is pointing to the other...

@DustinCampbell
Copy link
Member

This is the right place for the bug.

@attilaersek
Copy link

i'll try to reproduce the issue later today with vscode 1.0 and update the issue with details.

@DustinCampbell
Copy link
Member

Note that "dnx run" is unlikley to get fixed. We're focused on supporting ASP .NET Core RC2. When that is released, DNX will go away.

@attilaersek
Copy link

attilaersek commented Apr 20, 2016

@DustinCampbell : yes, i'm aware of that, although the csharp package 0.3.7 still depends on run-in-terminal package. it might use this dependency for other reasons too.

I've managed to reproduce the issue with vscode 1.0. It installs csharp package 0.3.7 as extension into:
~/.vscode\extensions\ms-vscode.csharp-0.3.7

run-in-terminal package version 0.0.3 is installed as lates version of the dependency (see package.json under dependencies)

Although this version has the commited pull request the problem still exists. To fix the issue the following changes are needed:

diff --git a/lib/index.ts b/lib/index.ts
index 09c5128..e802873 100644
--- a/lib/index.ts
+++ b/lib/index.ts
@@ -60,7 +60,7 @@ function runInTerminalWin(file: string, args: string[], options: Options): Promi
         '/wait',
         'cmd.exe',
         '/c',
-        `"${file} ${args.map(escapeWinArg).join(' ') } & pause"`
+        `""${file}" ${args.map(escapeWinArg).join(' ') } & pause"`
     ];

and it must be recompiled with tsc.

Should I open a new issue in run-in-terminal and create a pull request?

I'm not sure if this issue must remain open here until a new version is released, or someone should open a new one somewhere else? (for eg the cshap package is affected as well)

@DustinCampbell DustinCampbell added this to the 1.0.0-rtm milestone Apr 22, 2016
@DustinCampbell
Copy link
Member

FWIW, I'm planning to fix this by not using run-in-terminal at all. I think it's a bit awkward that a new terminal window is created for this operation. Instead, I'll just launch "dotnet" as a child process and capture the output and display it within VS Code.

@DustinCampbell
Copy link
Member

This should be fixed with #238. While the "dnx run" command is no longer relevant, we have removed run-in-terminal so other commands should not exhibit this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants