Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Check List
Resolves: #1884 (not really, but it implements a proposal made by @finswimmer)
I tried to base this PR on
develop
, but the tests do not run at all in that branch, so I based it onmaster
although it introduces a new feature.I added an
--all
option toenv remove
to remove all environments at once. The idea to use an option is also taken from the issue. Of the two variants, I prefer the option because it does not break the existing cli.On the other hand, this approach requires a little workaround, because the
python
argument toenv remove
needs to be optional for--all
to work, but without the--all
option it is a required argument. I'm manually throwing an exception if neither--all
nor an argument are given - in fact I throw the exception CliKit would have thrown in that case. I added an additional test just for this case.Maybe it would be best to add a complete new subcommand for this. I just had no good idea how to name it. Maybe
remove-all
, but I wasn't sure if you like dashes in commands. So if anyone has a good idea I happily adopt my PR.