From a26a2e1a178b2f2f971bbe3ed8873ac77319befe Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 13 Mar 2023 17:27:05 -0700 Subject: [PATCH] build runner: fix compilation errors on windows --- lib/std/Build/Step.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/std/Build/Step.zig b/lib/std/Build/Step.zig index 890babc74e..123122a74b 100644 --- a/lib/std/Build/Step.zig +++ b/lib/std/Build/Step.zig @@ -487,7 +487,7 @@ pub fn allocPrintCmd( arena: Allocator, opt_cwd: ?[]const u8, argv: []const []const u8, -) ![]u8 { +) Allocator.Error![]u8 { return allocPrintCmd2(arena, opt_cwd, null, argv); } @@ -496,11 +496,11 @@ pub fn allocPrintCmd2( opt_cwd: ?[]const u8, opt_env: ?*const std.process.EnvMap, argv: []const []const u8, -) ![]u8 { +) Allocator.Error![]u8 { var buf: std.ArrayListUnmanaged(u8) = .{}; if (opt_cwd) |cwd| try buf.writer(arena).print("cd {s} && ", .{cwd}); if (opt_env) |env| { - const process_env_map = try std.process.getEnvMap(arena); + const process_env_map = std.process.getEnvMap(arena) catch std.process.EnvMap.init(arena); var it = env.iterator(); while (it.next()) |entry| { const key = entry.key_ptr.*;