mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std.Build.Step.Run: fix up 681d324c49
https://github.com/ziglang/zig/pull/24151/files#r2217494741
This commit is contained in:
parent
b4fd57a9c1
commit
c58cce7999
1 changed files with 6 additions and 4 deletions
|
|
@ -1118,10 +1118,12 @@ fn runCommand(
|
|||
// Wine's excessive stderr logging is only situationally helpful. Disable it by default, but
|
||||
// allow the user to override it (e.g. with `WINEDEBUG=err+all`) if desired.
|
||||
if (env_map.get("WINEDEBUG") == null) {
|
||||
// We don't own `env_map` at this point, so turn it into a copy before modifying it.
|
||||
env_map = arena.create(EnvMap) catch @panic("OOM");
|
||||
env_map.hash_map = try env_map.hash_map.cloneWithAllocator(arena);
|
||||
try env_map.put("WINEDEBUG", "-all");
|
||||
// We don't own `env_map` at this point, so create a copy in order to modify it.
|
||||
const new_env_map = arena.create(EnvMap) catch @panic("OOM");
|
||||
new_env_map.hash_map = try env_map.hash_map.cloneWithAllocator(arena);
|
||||
try new_env_map.put("WINEDEBUG", "-all");
|
||||
|
||||
env_map = new_env_map;
|
||||
}
|
||||
} else {
|
||||
return failForeign(run, "-fwine", argv[0], exe);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue