Add environment to process spin up command

This commit is contained in:
Zontreck 2023-11-03 01:17:41 -07:00
parent 711eb44270
commit 93793ff300

View file

@ -42,13 +42,14 @@ class ProtonState extends State<Proton> {
} else { } else {
await dir.create(recursive: true); await dir.create(recursive: true);
} }
Platform.environment.putIfAbsent(
"STEAM_COMPAT_CLIENT_INSTALL_PATH", () => "~/.steam");
Platform.environment
.putIfAbsent("STEAM_COMPAT_DATA_PATH", () => dir.path);
Map<String, String> env = Map();
env.putIfAbsent(
"STEAM_COMPAT_CLIENT_INSTALL_PATH", () => "~/.steam");
env.putIfAbsent("STEAM_COMPAT_DATA_PATH", () => dir.path);
await Process.run( await Process.run(
"proton", ["run", "this_program_does_not_exist.exe"]); "proton", ["run", "this_program_does_not_exist.exe"],
environment: env);
}, },
) )
]), ]),