-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: deny empty positional arguments in all commands
We expected this function to be provided by Cobra, but it does not make that check. So, before the some commands accepting positional arguments allowed values like "" or ''. These are affectively empty strings, that is equivalent to no value in all or commands. As a matter of fact, some commands were panicking on this, some failing on API level with 400, 401, 404, 405, or 500 errors. The exact error which happened seems quite random. In the worst case this could lead to bad behavior, although I found no such use case. This disallows erroneous (empty) positional arguments once and for all commands. All (random) misbehaving commands I tried are now fixed. Signed-off-by: Volodymyr Khoroz <[email protected]>
- Loading branch information
Showing
1 changed file
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters