-
Notifications
You must be signed in to change notification settings - Fork 177
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
Invalid string in instrumented code caused by unescaped Windows pathmarks #491
Comments
+1 |
@TomGault FWIW, that fix worked great for me |
…ixed version (v1.1.6) to work around bug (see alex-seville/blanket#491).
@TomGault : Fix works for me as well 👍 |
+1 |
Running `mocha` exploded in Windows environments after 1.1.6 because the paths aren't properly normalized (see alex-seville#491). Normalizing `inputFilename` instead of `filename` fixes this problem.
…the paths aren't properly normalized (see alex-seville#491). Normalizing `inputFilename` instead of `filename` fixes this problem.
…the paths aren't properly normalized (see alex-seville#491). Normalizing `inputFilename` instead of `filename` fixes this problem, as demonstrated by @TomGault.
…aren't properly normalized (see alex-seville#491). Normalizing `inputFilename` instead of `filename` fixes this problem, as demonstrated by @TomGault.
…aren't properly normalized (see alex-seville#491). Normalizing `inputFilename` instead of `filename` fixes this problem, as demonstrated by @TomGault.
Mocha explodes in Windows environments after 1.1.6 because the paths aren't properly normalized (see alex-seville#491). Normalizing `inputFilename` instead of `filename` fixes this problem, as demonstrated by @TomGault.
Mocha explodes in Windows environments after 1.1.6 because the paths aren't properly normalized (see alex-seville#491). Normalizing `inputFilename` instead of `filename` fixes this problem, as demonstrated by @TomGault.
Haha, no problem. Thanks so much for doing the leg-work! |
+1 to this as well. Just ran into the same issue. Would be nice to get the PR merged and new patch released since I would like to use blanket but since most of our development is happening in Windows envs, the thing doesn't currently work :( |
Also, I noticed that the However, in inputFilename = filename.replace(process.cwd(),""); ...into this... inputFilename = filename.replace(blanket.normalizeBackslashes(process.cwd()),""); ...fixed the issue. Could you update this into the PR? |
@mikkotikkanen That line doesn't exist on the |
Oh. Great. |
Due to a lack of resources for project maintenance, the master branch is effectively the main branch now. If you open a PR against master I may have time to review and merge. Sorry. |
Kk. Yeah, that's why the dev branch is usually master since it keeps the maintenance work at minimum, providing the pull requests are proper. :) |
Okay, new PR created! @mikkotikkanen, probably best that you make a new PR for your suggestion. |
#514 is merged now. Thanks everyone! |
This bug is still found in the version ^1.1.7 of blanket. I've changed the code like what the OP did and it went away. |
Yep, it's back in 1.1.7 |
@alex-seville Could you deploy a new version when you have time? GitHub tells me 1.1.7 was released back in May. Thanks! |
I don't have the time to do a complete PR for this guy but I'll tell you what I do know:
It looks like the Windows pathmarks are not being escaped. That is,
c:\git-repos
should bec:\\git-repos
, or, since node is pretty smart, it totally works if you usec:/git-repos
.project/node_modules/blanket/src/index.js looks like this (starting at line 128 for me)
If I change it to this (i.e. normalize the input filename), then the error goes away:
The text was updated successfully, but these errors were encountered: