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
Run middlewares even if no commands specified #1329
Comments
Hi @nicolay-borzov, Can you log argv._ immediately before and after reassignment for both examples and share it here? |
Updated issue. The problem here is that middleware isn't called in first case |
Strange, I’m assuming it’s because there are no commands added in the first example and hence no middleware would run. @bcoe: Interested to know your thoughts on this. Should middleware run even if no commands are added? I’m leaning towards yes. |
@aorinevo I'd argue it should work if you specify a default command with:
https://github.com/yargs/yargs/blob/master/docs/advanced.md#default-commands But that it's beyond the scope of middle-ware to run if no commands are specified; I'm curious if it does work with a default command? would be good to add a test. |
Closing in favor of the newer #1351 |
Use case: Parse variable number of file paths and remove extra
'
This doesn't work
This works
The text was updated successfully, but these errors were encountered: