You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Case 1.
When garden is executed with an unrecognized option and without any command (e.g. garden --bad) it prints the usage help and exists with code 0.
Case 2.
When garden is executed with an unrecognized sub-command (e.g. garden run bad) it prints the usage help and exists with code 0.
Expected behavior
In both cases above garden should exit with code 1 if an unrecognized option or sub-command is passed.
Reproducible example
Run these commands:
# Unrecognized option:
> garden --bad
# usage output omitted
# ...
> echo$?0 # <- this is wrong
# Unrecognized sub-command:
> garden delete bad
# usage output omitted
# ...
> echo$?0 # <- this is wrong
Workaround
No
Suggested solution(s)
Implement checks for garden's options inspection and exit with code 1 on unrecognized options.
Note! The old behaviour for other testing scenarios is correct and must be kept:
Bug
Current Behavior
Case 1.
When
garden
is executed with an unrecognized option and without any command (e.g.garden --bad
) it prints the usage help and exists with code0
.Case 2.
When
garden
is executed with an unrecognized sub-command (e.g.garden run bad
) it prints the usage help and exists with code0
.Expected behavior
In both cases above
garden
should exit with code1
if an unrecognized option or sub-command is passed.Reproducible example
Run these commands:
Workaround
No
Suggested solution(s)
Implement checks for
garden
's options inspection and exit with code1
on unrecognized options.Note! The old behaviour for other testing scenarios is correct and must be kept:
Make sure we have the tests for the scenarios above. Please implement the missing test scenarios if any.
Additional context
This comes from the discussion started in #4868.
Your environment
garden version 0.13.9
garden version 0.12.63
The text was updated successfully, but these errors were encountered: