Factor out version-printing to usage.cpp (#1870)

This commit is contained in:
Rangi
2025-12-05 23:04:49 -05:00
committed by GitHub
parent c8161be23a
commit 33475e2c36
6 changed files with 14 additions and 11 deletions

View File

@@ -23,7 +23,6 @@
#include "usage.hpp"
#include "util.hpp"
#include "verbosity.hpp"
#include "version.hpp"
#include "gfx/pal_spec.hpp"
#include "gfx/process.hpp"
@@ -409,7 +408,7 @@ static void parseArg(int ch, char *arg) {
// LCOV_EXCL_START
case 'V':
printf("%s %s\n", usage.name.c_str(), get_package_version_string());
usage.printVersion(false);
exit(0);
case 'v':
@@ -481,7 +480,7 @@ static void verboseOutputConfig() {
style_Set(stderr, STYLE_MAGENTA, false);
fprintf(stderr, "%s %s\n", usage.name.c_str(), get_package_version_string());
usage.printVersion(true);
printVVVVVVerbosity();