Add --version lowercase flag to comply with convention

This commit is contained in:
parker-research
2026-05-14 15:19:37 +02:00
committed by Gwenhael Goavec-Merou
parent 834c45b682
commit fe21c890a4
2 changed files with 7 additions and 3 deletions
+3 -2
View File
@@ -1027,7 +1027,8 @@ int parse_opt(int argc, char **argv, struct arguments *args,
cxxopts::value<std::string>(args->read_register))
("user-flash", "User flash file (Gowin LittleBee FPGA only)",
cxxopts::value<std::string>(args->user_flash))
("V,Version", "Print program version");
("V,version", "Print program version")
("Version", "Print program version (Deprecated)");
options.parse_positional({"bitstream"});
auto result = options.parse(argc, argv);
@@ -1055,7 +1056,7 @@ int parse_opt(int argc, char **argv, struct arguments *args,
args->verbose = verbose_level;
}
if (result.count("Version")) {
if (result.count("Version") || result.count("version")) {
std::cout << "openFPGALoader " << VERSION << std::endl;
return 1;
}