mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-12 11:37:27 +00:00
feat: add command line option to disable color output
This commit is contained in:
@@ -30,6 +30,12 @@ const CommandLineOption* const OPTION_VERBOSE =
|
||||
.WithDescription("Outputs a lot more and more detailed messages.")
|
||||
.Build();
|
||||
|
||||
const CommandLineOption* const OPTION_NO_COLOR =
|
||||
CommandLineOption::Builder::Create()
|
||||
.WithLongName("no-color")
|
||||
.WithDescription("Disables colored terminal output.")
|
||||
.Build();
|
||||
|
||||
constexpr auto CATEGORY_INPUT = "Input";
|
||||
|
||||
const CommandLineOption* const OPTION_HEADER =
|
||||
@@ -87,6 +93,7 @@ const CommandLineOption* const COMMAND_LINE_OPTIONS[]{
|
||||
OPTION_HELP,
|
||||
OPTION_VERSION,
|
||||
OPTION_VERBOSE,
|
||||
OPTION_NO_COLOR,
|
||||
OPTION_HEADER,
|
||||
OPTION_COMMANDS_FILE,
|
||||
OPTION_OUTPUT_FOLDER,
|
||||
@@ -170,6 +177,9 @@ bool ZoneCodeGeneratorArguments::ParseArgs(const int argc, const char** argv, bo
|
||||
else
|
||||
con::globalLogLevel = con::LogLevel::INFO;
|
||||
|
||||
// --no-color
|
||||
con::globalUseColor = !m_argument_parser.IsOptionSpecified(OPTION_NO_COLOR);
|
||||
|
||||
// -p; --print
|
||||
if (m_argument_parser.IsOptionSpecified(OPTION_PRINT))
|
||||
m_task_flags |= FLAG_TASK_PRINT;
|
||||
|
Reference in New Issue
Block a user