Fix providing vector-like options using the equals sign (#648)

This commit is contained in:
Roman Grundkiewicz 2020-07-26 17:35:30 +01:00 committed by GitHub
parent 44757877df
commit 9d4cc7b13d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
and translation with options --tsv and --tsv-fields n.
### Fixed
- Providing a single value to vector-like options using the equals sign, e.g. --models=model.npz
- CMake-based compilation on Windows
- Fix minor issues with compilation on MacOS
- Fix warnings in Windows MSVC builds using CMake

View File

@ -1595,7 +1595,8 @@ class App {
if(num < 0) {
// RG: We need to keep track if the vector option is empty and handle this separately as
// otherwise the parser will mark the command-line option as not set
bool emptyVectorArgs = true;
// RG: An option value after '=' was already collected
bool emptyVectorArgs = (collected <= 0);
while(!args.empty() && _recognize(args.back()) == detail::Classifer::NONE) {
if(collected >= -num) {
// We could break here for allow extras, but we don't