2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-02-14 11:23:02 +00:00

fix: only show console color when supported

This commit is contained in:
Jan Laupetin
2025-11-30 16:28:35 +00:00
parent a4aaefa648
commit 7227772045
14 changed files with 108 additions and 29 deletions

View File

@@ -46,6 +46,8 @@ public:
int Run(const int argc, const char** argv)
{
con::init();
auto shouldContinue = true;
if (!m_args.ParseArgs(argc, argv, shouldContinue))
return 1;

View File

@@ -127,12 +127,12 @@ bool RawTemplaterArguments::ParseArgs(const int argc, const char** argv, bool& s
// -v; --verbose
if (m_argument_parser.IsOptionSpecified(OPTION_VERBOSE))
con::globalLogLevel = con::LogLevel::DEBUG;
con::set_log_level(con::LogLevel::DEBUG);
else
con::globalLogLevel = con::LogLevel::INFO;
con::set_log_level(con::LogLevel::INFO);
// --no-color
con::globalUseColor = !m_argument_parser.IsOptionSpecified(OPTION_NO_COLOR);
con::set_use_color(!m_argument_parser.IsOptionSpecified(OPTION_NO_COLOR));
// -o; --output
if (m_argument_parser.IsOptionSpecified(OPTION_OUTPUT_FOLDER))