mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-12-02 17:27:47 +00:00
feat: add command line option to disable color output
This commit is contained in:
@@ -36,6 +36,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();
|
||||
|
||||
const CommandLineOption* const OPTION_BASE_FOLDER =
|
||||
CommandLineOption::Builder::Create()
|
||||
.WithShortName("b")
|
||||
@@ -116,6 +122,7 @@ const CommandLineOption* const COMMAND_LINE_OPTIONS[]{
|
||||
OPTION_HELP,
|
||||
OPTION_VERSION,
|
||||
OPTION_VERBOSE,
|
||||
OPTION_NO_COLOR,
|
||||
OPTION_BASE_FOLDER,
|
||||
OPTION_OUTPUT_FOLDER,
|
||||
OPTION_ADD_ASSET_SEARCH_PATH,
|
||||
@@ -200,6 +207,9 @@ bool LinkerArgs::ParseArgs(const int argc, const char** argv, bool& shouldContin
|
||||
else
|
||||
con::globalLogLevel = con::LogLevel::INFO;
|
||||
|
||||
// --no-color
|
||||
con::globalUseColor = !m_argument_parser.IsOptionSpecified(OPTION_NO_COLOR);
|
||||
|
||||
// b; --base-folder
|
||||
if (m_argument_parser.IsOptionSpecified(OPTION_BASE_FOLDER))
|
||||
m_base_folder = m_argument_parser.GetValueForOption(OPTION_BASE_FOLDER);
|
||||
|
||||
Reference in New Issue
Block a user