Remove global flags from filesystem command#772
Conversation
dc4dcfa to
ad37fe4
Compare
|
Is there any way to trigger the missing "circleci" check? |
Could you merge the main branch into this branch? I believe it will fix the issue. Also, would you fix README as well? |
If the global flags are added to the subcommand as well as being used globally, their value will be overwritten when the arguments for the subcommand are parsed. This leads to the value passed to the flag at the global position being lost.
ad37fe4 to
dbd10b1
Compare
Rebased the branch on top current
Updated using the output of the command with |
Codecov Report
@@ Coverage Diff @@
## main #772 +/- ##
==========================================
- Coverage 68.50% 68.36% -0.15%
==========================================
Files 57 57
Lines 2210 2200 -10
==========================================
- Hits 1514 1504 -10
Misses 564 564
Partials 132 132
Continue to review full report at Codecov.
|
|
Thanks a lot! |
|
You're welcome! |
If the global flags are added to the subcommand as well as being used globally, their value will be overwritten when the arguments for the subcommand are parsed. This leads to the value passed to the flag at the global position being lost:
The
--quiethere is without effect, which means that the log messages are still written to the output.This issue can also be fixed in the "other direction" by removing the flags from the global options, depending on which style of options is preferred, just one style should be used across the whole application. I can update this PR depending on the decision.