feat: print custom environment variables in log

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
(cherry picked from commit ca5e1e0f1b)
This commit is contained in:
Octol1ttle 2026-01-21 11:46:59 +05:00 committed by Trial97
parent 766de43e33
commit 0baca3fbea
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318

View file

@ -1002,6 +1002,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;
}