-
Notifications
You must be signed in to change notification settings - Fork 14
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
CLI should take multiple paths and not a glob pattern #44
Comments
Related thing that this will likely close: #32 |
I'm not sold on this. node users in particular are conditioned to provide globs as arguments because expansion by the shell is not trustworthy or consistent [1] between the many environments of a teenytest suite (their various maintainers machines + at least one CI box). [1] see globstar and that it is commonly either unavailable (due to old versions of bash) or, when available, it is off-by-default. Without globstar support (assuming we remove expansion by teenytest), it would not be possible to have teenytest run on subdirectories of a test directory. |
@jasonkarns would you recommend any changes, then, to teenytest's behavior? |
I think we should still implement #32, to take in multiple paths and/or globs, and simply expanding all of those args as if they were globs, flattening the resulting array. That would allow users to use shell globs if they are able, or to quote the globs and let teenytest expand them. ie, i'd expect the following to all work:
|
@jasonkarns I agree, I think. @cpruitt, are you on the same page as Jason? related #45 |
@searls Yes, I agree with Jason. The work I've been doing while using Apple's default bash installation has bumped into the globstar issues he's is bringing up. I think treating all args as globs, even if they've already been expanded, is the most reliable way forward. If the user wants to use shell expansion then it would still work, but I'd be inclined to say that encouraging the use of glob strings over allowing the shell to expand globs would be a good thing to explain/encourage in documentation. |
When invoked via the CLI, take paths like a normal unix app would, rather than ask users to provide globs in quotes.
This will probably be a breaking change demanding a major bump, but it's the right thing to do to make the cli behave conventionally
The text was updated successfully, but these errors were encountered: