Skip to content

Commit e38655c

Browse files
committed
fix for --json argument
1 parent 14bb6b9 commit e38655c

1 file changed

Lines changed: 34 additions & 8 deletions

File tree

src/cli/main.cpp

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,40 @@ int main(int argc, char* argv[]) {
174174
return 0;
175175
}
176176

177-
static const std::array<std::pair<const char*, arg_enum>, 32> table{ {
178-
{ "-h", HELP }, { "-v", VERSION }, { "-a", ALL }, { "-d", DETECT }, { "-s", STDOUT }, { "-b", BRAND },
179-
{ "-p", PERCENT }, { "-c", CONCLUSION }, { "-l", BRAND_LIST }, { "-n", NUMBER }, { "-t", TYPE }, { "-o", OUTPUT },
180-
{ "help", HELP }, { "--help", HELP }, { "--version", VERSION }, { "--all", ALL }, { "--detect", DETECT },
181-
{ "--stdout", STDOUT }, { "--brand", BRAND }, { "--percent", PERCENT }, { "--conclusion", CONCLUSION },
182-
{ "--brand-list", BRAND_LIST }, { "--number", NUMBER }, { "--type", TYPE }, { "--disable-notes", NOTES },
183-
{ "--high-threshold", HIGH_THRESHOLD }, { "--dynamic", DYNAMIC }, { "--verbose", VERBOSE }, { "--enums", ENUMS },
184-
{ "--no-ansi", NO_ANSI }, { "--detected-only", DETECTED_ONLY }, { "--json", JSON }
177+
static const std::array<std::pair<const char*, arg_enum>, 33> table{ {
178+
{ "-h", HELP },
179+
{ "-v", VERSION },
180+
{ "-a", ALL },
181+
{ "-d", DETECT },
182+
{ "-s", STDOUT },
183+
{ "-b", BRAND },
184+
{ "-p", PERCENT },
185+
{ "-c", CONCLUSION },
186+
{ "-l", BRAND_LIST },
187+
{ "-n", NUMBER },
188+
{ "-t", TYPE },
189+
{ "-o", OUTPUT },
190+
{ "help", HELP },
191+
{ "--help", HELP },
192+
{ "--version", VERSION },
193+
{ "--all", ALL },
194+
{ "--detect", DETECT },
195+
{ "--stdout", STDOUT },
196+
{ "--brand", BRAND },
197+
{ "--percent", PERCENT },
198+
{ "--conclusion", CONCLUSION },
199+
{ "--brand-list", BRAND_LIST },
200+
{ "--number", NUMBER },
201+
{ "--type", TYPE },
202+
{ "--disable-notes", NOTES },
203+
{ "--high-threshold", HIGH_THRESHOLD },
204+
{ "--dynamic", DYNAMIC },
205+
{ "--verbose", VERBOSE },
206+
{ "--enums", ENUMS },
207+
{ "--no-ansi", NO_ANSI },
208+
{ "--detected-only", DETECTED_ONLY },
209+
{ "--json", JSON },
210+
{ "--output", OUTPUT }
185211
} };
186212

187213
std::string potential_null_arg;

0 commit comments

Comments
 (0)