Use 'slash' on input files before globbing to support absolute paths with backslashes on Windows#355
Conversation
…with backslashes on Windows
|
Forgive me for my ignorance (I've never actually run postcss on Windows), but why can't you just pass paths with forward slashes from the CLI? |
|
@RyanZim, on Windows, the natural directory separator is a backslash. For instance, if you tab-autocomplete a path in a Windows command line, it will convert forward slashes to backslashes. So, in particular for a command line tool, I think it is important to accept paths in the system's standard format. |
RyanZim
left a comment
There was a problem hiding this comment.
Got it, tab-autocomplete. That makes sense; LGTM.
|
Will try to release this later this week. |
|
Eh, that was a bit longer than a week. Regardless, published in v8.2.0. 🚀 |
globby (used to glob input arguments to postcss-cli) only supports forward slashes.
In order to be able to provide absolute paths containing backslashes to the CLI on Windows, they need to be converted to forward slashes, otherwise postcss-cli terminates with the error message 'Input Error: You must pass a valid list of files to parse'.