-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Avoid treating \ as escape char on Windows #39
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #39 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 143 145 +2
=========================================
+ Hits 143 145 +2
Continue to review full report at Codecov.
|
it is not good that isEscapeRune always return false. |
I agree @mattn - as I mentioned above this is rather simple solution which is just addressing the known I can look into more complete solution, but I expect it to be much more complex than this, because escaping on Windows seems to be more context-dependent, so it's not as simple as declaring a single rune as escape character I'm afraid, unless I misread the available docs on this. Also escaping behaviours may differ between cmd.exe and PowerShell. Either way if you are willing to review/discuss better Windows support I can look into it. |
Hey, how can I help getting this merged in? We have a replace in our go.mod for almost a year now 😬 |
Hi @mattn @radeksimko, any plans on moving this PR forward? Seems like someone over at #38 have confirmed that this fix works. Would be great to have this feature in this package! |
@jamestiotio I've been using a fork in @goreleaser for a while now: https://github.com/caarlos0/go-shellwords It would be nicer if @mattn could merge this though |
Fixes #38
While this is probably not a perfect solution, I think it makes a good start as it makes all tests pass on Windows and fixes the most common issue when
\
paths are used in the input.I originally wanted to implement proper escaping for Windows too, but then I realized it would be a little more complex and I thought this is already a progress. 🤷♂️