mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-05 21:06:58 +03:00
feat: print custom environment variables in log
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
(cherry picked from commit ca5e1e0f1b)
This commit is contained in:
parent
766de43e33
commit
0baca3fbea
1 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue