mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-12-18 00:17:48 +00:00
fix: only show console color when supported
This commit is contained in:
@@ -94,12 +94,12 @@ bool ModManArgs::ParseArgs(const int argc, const char** argv, bool& shouldContin
|
||||
|
||||
// -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));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -129,6 +129,8 @@ int main(int argc, const char** argv)
|
||||
g_set_application_name("OpenAssetTools ModMan");
|
||||
#endif
|
||||
|
||||
con::init();
|
||||
|
||||
ModManArgs args;
|
||||
auto shouldContinue = true;
|
||||
if (!args.ParseArgs(MODMAN_ARGC, MODMAN_ARGV, shouldContinue))
|
||||
|
||||
Reference in New Issue
Block a user