-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support Windows paths #698
Conversation
The supplied patch is not working correctly (see the failing tests). |
Btw, @jonas054 @yujinakayama any thoughts on this? I'm wondering what's the best way to handle this, but I haven't dealt with Windows paths in ages. |
I'm not sure why we have a problem in the first place. Is it because we're assuming that the file separator is |
Yes - it is simply that (as stated in the readme) paths are / separated when entered on the command-line. A Windows user would expect to be using . |
I have never dealt with Windows paths too. My initial concerns were:
Then I've investigated a bit:
Thus, I think it's ok if we add |
@yujinakayama Excellent research. @rifraf Please, update your PR according to @yujinakayama's comments and update the changelog as well. |
File::ALT_SEPARATOR can be nil on non-Windows...
@@ -10,6 +10,7 @@ | |||
|
|||
### Bugs fixed | |||
|
|||
* [#698](https://github.com/bbatsov/rubocop/pull/698): Support Windows paths on command-line. ([@rifraf][]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add your nickname to the list at the bottom of the file as well and squash the commits together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry - I'm at the limits of my knowledge here. I wasn't really expecting all these magic tests to run (and complain) while I thought I was working quietly on a fork where no-one was watching...
I don't know how to squash the commits - can you help?
Also am I already updating the original PR or do I ship a new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. I've squashed and merged your changes manually.
This change allows me to type rubocop c:\d\e in Windows instead of c:/d/e.
In particular, if I use sublime_rubocop, this allows me to check projects and folders