- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 66
Open
Description
This applies to version 1.7 and was not occurring in 1.6.1. The following program
#include <lyra/lyra.hpp>
#include <iostream>
#include <string>
int main(int argc, const char *argv[]) {
  std::string a;
  std::string b;
  lyra::cli cli = lyra::opt(a, "A")["-a"]["--a-flag"]("The A flag").required()
                  | lyra::opt(b, "B")["-b"]["--b-flag"]("The B flag").required();
  auto result = cli.parse({argc, argv});
  if (!result) {
    std::cerr << "Error in command line: " << result.message() << std::endl;
  }
}
when run as main -a ayy (i.e. omitting the required --b-flag) prints Error in command line: Unrecognized argument '-a' while parsing: -b|--b-flag <B>, when previously it would've printed Error in command line: Expected: -b|--b-flag <B>.
Metadata
Metadata
Assignees
Labels
No labels