-
Notifications
You must be signed in to change notification settings - Fork 48
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
try to writing to no exit pipe #77
Comments
@betsu So I couldn't see any difference between this v5 and v4 code paths here and I wasn't able to replicate your problem, but I've pushed out |
Hi @blakeembrey,
and running.
Oh! success!! P.S. In line 68 |
@betsu Thanks! That makes sense. Looks like an escaping issue, I'll look into how to better fix that. |
@betsu Can you take a look at #78? I settled using single quotes with https://stackoverflow.com/questions/1250079/how-to-escape-single-quotes-within-single-quoted-strings. I first went with https://github.com/substack/node-shell-quote but saw https://github.com/substack/node-shell-quote/pull/34, don't use Windows so I'm not sure about whether you can escape backslashes there? I saw in your example above you didn't need to escape the backslashes so that may be incompatible with Unix. |
@blakeembrey I have already tested at #78, there's no need to escape the backslashes when add double quotes. |
@betsu Just to double check, sorry, #78 is using single quotes. Is that still ok? I'm going to merge and release today. The reason I chose to use single quotes is that it appeared to have a lot less escaping requirements. With double quotes, a lot of interpolation is still possible if you don't escape everything. |
@blakeembrey
I don't know what's better solution, maybe detecting window then add double quote? |
@betsu Hmm, I don't really understand Windows shell scripting. I've been trying to read things like https://blogs.technet.microsoft.com/heyscriptingguy/2015/06/20/weekend-scripter-understanding-quotation-marks-in-powershell/ which seems like it should work. Can you describe the shell you're using on Windows? How do I open it? Maybe I can play around and test in Windows this week. The issue with using double quotes is we don't want something else (e.g.
(Note the double backslashes which need to normally be escaped in Unix shell's because it's an escape character). As for detecting windows, I'm not sure how that would work with things like bash on windows (now that it's native). |
@blakeembrey I understand you worried about double quote's problem. But this issue (path with space) that seems like only double quote can be solved on windows. In node
Above demo code via I'm using vscode terminal that inside are command prompt and powershell. |
@blakeembrey Sorry I'm late. I already tested that is working fine! |
Thanks for fixed #76 .
I use v5.1.1 and run the same pipe code
css.txt still no content and I get those message
after I try running this code
css.txt is witted and exit code looks fine!
what's happen in first code?
The text was updated successfully, but these errors were encountered: