min-required correctly finds tagged release versions #206
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.
Problem: 'tfenv <install|use> min-required' incorrectly interprets a tagged release (ie rc1,beta2,alpha3).
For example, ">=0.13.0-rc1" is mangled by the translation and results in interpreting min-required as "0.13.1". This is a bug because at worst results can install and use an undesired version, but mostly is annoying for testing tagged versions.
Solution
The solution is to use a basic regex with 'grep' instead of 'tr' to properly acquire both normal and tagged release versions. An extra test was added to account for this; the results are below.
Notes
Problem in practice (debug):
Solution in practice (debug):