-
-
Notifications
You must be signed in to change notification settings - Fork 105
Escape path-related npm options on Windows #181
base: latest
Are you sure you want to change the base?
Conversation
0875baa
to
c23c994
Compare
@zkat
Investigating... |
I was able to make the errors go away by adding another escape: existing = child.escapeArg(existing, false) beneath Line 299 in c23c994
This basically just wraps |
@noahleigh I think The Thing that's caused most of these problems is that The refactor to make that not as painful is something I can't even think about right now, so I think this is a matter of figuring out how |
c23c994
to
92e5330
Compare
@noahleigh I pushed a patch because I realized there was a bug. Can you try it again with this branch and see if you still need the |
92e5330
to
dee7f22
Compare
@zkat
I tried setting |
dee7f22
to
1d1ee54
Compare
@noahleigh I think that was a bug in the test itself! I think Node itself gets kinda weird about that style of escaping and it's really annoying? |
@zkat Here's where I'm at with testing. As this branch currently stands, I get the same results running Running the commands that are being tested manually in the terminal accurately reflects the current state of Code existing = child.escapeArg(existing, true) Result
Code existing = child.escapeArg(existing, false) Result
Code // existing = child.escapeArg(existing, false) Result
Anything else you'd like me to test? |
I think I'm good. Sorry to make you thrash like that. I'll have to spend some nice 1:1 time with Windows to make sure this stuff is actually covered. 💚 I'll update y'all when I'm more certain it actually works. |
Okay! Let me know if you need any more testing done 👍 |
Is there any progress on this? Anything we can do to help? |
Will this fix ever make it in? npx is useless on Windows as it is... |
Just ran into this bug, I have a space in my Windows username and npx DID NOT like it. What's the holdup on a merge? |
Combining this PR with #146 (comment), I was able to get |
It has been over a year since any work was done on this, so I think this PR is dead unless someone else wants to fork it. For others experiencing the issue, there seems to be a low pain workaround is to use Windows Short Names when configuring NPM. See #146 (comment) |
Would be nice for this to get merged instead of using a workaround, though. Specially for new users, would be ideal for this to work without extra configurations. |
This patch supersedes #138 and adds a bit more escaping, now that I actually managed to wrap my head around what was actually going on, and the different bizarre escaping things related to windows (oh god it's so bad).
I think this should iron out the main issue on Windows and solve some others that were lurking in the shadows, ready to strike.
/cc @brianpeiris @noahleigh