-
Notifications
You must be signed in to change notification settings - Fork 31
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
glob() regular file paths on Windows, drop --glob parameter #25
Comments
The way I read #21, I thought I can definitely do what you suggest @mprobst , but I'd like to better understand the original issue then so that I don't incorrectly fix it again. @alexeagle, what functionality does the |
@filipesilva on Linux, your shell resolves globs for you. E.g. even if you type So my suggestion would be to detect that we're running on Windows, and only there expand globs in the passed in list of files. That means every user, Linux or not, can run I don't understand @alexeagle's comment about nested directories either, shells can glob with nested directories just fine ( So I'm not entirely sure what we're trying to fix here? |
I want /*.ts minus node_modules//*.ts - that's the one I can't do with On Mon, Feb 15, 2016 at 3:27 AM Martin Probst notifications@github.com
|
And I think in a nodejs environment, globbing is well understood but piping together the find command is more advanced |
So how about this, to satisfy both this issue and #24:
|
Generally SGTM, one comment:
I presume we then just run node-glob to process the excludes? There's also one potential confusion: node-glob understands "*/.js", i.e. That makes me thing we might want to unconditionally always run node-glob |
I wasn't aware there would be a difference with the doublestar, but if the behavior might be different then it is better to always do |
Apologies for the delay in getting to this. I put up a PR with proposed changes, which aren't quite what we discussed but I explain my reasoning there. See #26 |
See comment from review (that I didn't see on Friday, sorry for the late drive by comment!):
Could you add docs that this is of course a Windows-only issue, and that on UNIXens including Macs the shell itself is doing the globbing?
To that point, I think it might be smarter to not have
--glob=....
, but rather just check if the machine is running on Windows, and then glob over the regular arguments. That'd allow users to run mostly the same command line on Linux, Macs, and Windows, which is nice for consistent development environments.The text was updated successfully, but these errors were encountered: