feat: print custom environment variables in log
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
@@ -1008,6 +1008,17 @@ QStringList MinecraftInstance::verboseDescription(AuthSessionPtr session, Minecr
|
||||
|
||||
out << "Launcher: " + getLauncher();
|
||||
out << emptyLine;
|
||||
|
||||
// environment variables
|
||||
const QString env = settings->get("OverrideEnv").toBool() ? settings->get("Env").toString() : APPLICATION->settings()->get("Env").toString();
|
||||
if (auto envMap = Json::toMap(env); !envMap.isEmpty()) {
|
||||
out << "Custom environment variables:";
|
||||
for (auto [key, value] : envMap.asKeyValueRange()) {
|
||||
out << indent + key + "=" + value.toString();
|
||||
}
|
||||
out << emptyLine;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user