Skip to content

Commit c58cce7

Browse files
committed
1 parent b4fd57a commit c58cce7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/std/Build/Step/Run.zig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,10 +1118,12 @@ fn runCommand(
11181118
// Wine's excessive stderr logging is only situationally helpful. Disable it by default, but
11191119
// allow the user to override it (e.g. with `WINEDEBUG=err+all`) if desired.
11201120
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.
1122-
env_map = arena.create(EnvMap) catch @panic("OOM");
1123-
env_map.hash_map = try env_map.hash_map.cloneWithAllocator(arena);
1124-
try env_map.put("WINEDEBUG", "-all");
1121+
// We don't own `env_map` at this point, so create a copy in order to modify it.
1122+
const new_env_map = arena.create(EnvMap) catch @panic("OOM");
1123+
new_env_map.hash_map = try env_map.hash_map.cloneWithAllocator(arena);
1124+
try new_env_map.put("WINEDEBUG", "-all");
1125+
1126+
env_map = new_env_map;
11251127
}
11261128
} else {
11271129
return failForeign(run, "-fwine", argv[0], exe);

0 commit comments

Comments
 (0)