authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-20 01:15:46+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-20 07:25:05+02:00
logc58cce799932a5b9a735ac359794ec8bcde61633
tree2dde71a66c7a1f4b87739b80f3819a8a8a5c665d
parentb4fd57a9c114748afb9ba0a04bede61089a02ddf

std.Build.Step.Run: fix up 681d324c49e7cdc773cc891ea49ed69dd03c23c7

https://github.com/ziglang/zig/pull/24151/files#r2217494741

1 files changed, 6 insertions(+), 4 deletions(-)

lib/std/Build/Step/Run.zig+6-4
...@@ -1118,10 +1118,12 @@ fn runCommand(...@@ -1118,10 +1118,12 @@ fn runCommand(
1118 // Wine's excessive stderr logging is only situationally helpful. Disable it by default, but1118 // Wine's excessive stderr logging is only situationally helpful. Disable it by default, but
1119 // allow the user to override it (e.g. with `WINEDEBUG=err+all`) if desired.1119 // allow the user to override it (e.g. with `WINEDEBUG=err+all`) if desired.
1120 if (env_map.get("WINEDEBUG") == null) {1120 if (env_map.get("WINEDEBUG") == null) {
1121 // We don't own `env_map` at this point, so turn it into a copy before modifying it.1121 // We don't own `env_map` at this point, so create a copy in order to modify it.
1122 env_map = arena.create(EnvMap) catch @panic("OOM");1122 const new_env_map = arena.create(EnvMap) catch @panic("OOM");
1123 env_map.hash_map = try env_map.hash_map.cloneWithAllocator(arena);1123 new_env_map.hash_map = try env_map.hash_map.cloneWithAllocator(arena);
1124 try env_map.put("WINEDEBUG", "-all");1124 try new_env_map.put("WINEDEBUG", "-all");
1125
1126 env_map = new_env_map;
1125 }1127 }
1126 } else {1128 } else {
1127 return failForeign(run, "-fwine", argv[0], exe);1129 return failForeign(run, "-fwine", argv[0], exe);