-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Failure to run coverage with ava when the path has a space #784
Comments
Also having a problem with |
Have you found a solution for this issue? I'm getting it today. |
@nicolaspfernandes I haven't found a solution yet. Right now I have just worked around it by checking out in a path that does not have spaces. |
The similar issue with path, but with testing child processes via require('child_process').spawn |
Facing the same issue when using a user with a space in the name, getting The project itself is not placed on the path with a space, it's placed on another drive. But for some reason nyc accesses the C:\ path for something. Same error found with CMD and PowerShell as well.
No issue on my other computer running Windows 10, but that one doesn't have any spaces in the username. |
I have the same problem. The logs are:
|
I am looking into it |
Can't call `nyc npm run test-spec` on a windows machine where the user folder contains a space due to nyc bug: istanbuljs/nyc#784 package.json `script` was modified slightly to work around this without changing behaviour Had to remove pre-commit hook due to windows issues
"Further activity" so this issue stays open |
The issue is caused by node's os.homedir() function. The particular line to fix is here: https://github.com/istanbuljs/nyc/blob/master/bin/nyc.js#L47 I would recommend using os.tmpdir() instead which automatically uses the 8.3 short name format (https://en.wikipedia.org/wiki/8.3_filename) For those who need to get past this issue before a fix, you can assign the env var Hope that helps! |
This seems to be a non-issue on Linux platforms? I just did the following:
This correctly showed a #!/usr/bin/env node
console.log('hello'); Then ran:
And this worked. So if this is a Windows specific issue maybe it could be fixed within spawn-wrap? If we need to switch from |
I agree with @coreyfarrell 's concerns and after doing a bit more research on the issue it appears that even tmpdir() wouldn't fix the problem because it is merely a pass-thru for whatever env var is already set (and tmpdir just happened to be in 8.3 format on my machine) (ref: Node Issue 17586)
Turns out the bug was fixable, PR to spawn-wrap is up - istanbuljs/spawn-wrap#98 |
… in powershell and cmd.
…ndows 10 in powershell and cmd.
Thanks ya'll!! |
Expected Behavior
When running (
npm run test:cov
) on a windows box with a home path ofC:\Users\First Last\repo-name
would expect the same type of behavior when the path does not have a space in it.Observed Behavior
Currently, when I try to run I get an error on windows
'C:\Users\First' is not recognized as an internal or external command
, indicating the spaces are not escaped correctly.Bonus Points! Code (or Repository) that Reproduces Issue
The following is an excerpt from our package.json file:
Forensic Information
Windows 10 x64 machine
CWD
= C:\Users\Michael Brogdon\repository-nameVersion info:
The text was updated successfully, but these errors were encountered: