-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix infinite loop case for envvar backed opts (#50)
This is a regression introduced by the feature "Allow required options to be satisfied by an nev var". The bug lies in `optsMatcher`, which iterates over its options, and keeps looping until no more options can match or there is no more input to feed them. If one of the options can be satsified from an en var, it doesn't consume any input, and returns true, causing an inifinite loop. The proposed fix is to exclude an option (in `optsMatcher`) whenever it has been satisfied by an env var.
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
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
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
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