| ... | ... | @@ -487,7 +487,7 @@ pub fn allocPrintCmd( |
| 487 | 487 | arena: Allocator, |
| 488 | 488 | opt_cwd: ?[]const u8, |
| 489 | 489 | argv: []const []const u8, |
| 490 | | ) ![]u8 { |
| 490 | ) Allocator.Error![]u8 { |
| 491 | 491 | return allocPrintCmd2(arena, opt_cwd, null, argv); |
| 492 | 492 | } |
| 493 | 493 | |
| ... | ... | @@ -496,11 +496,11 @@ pub fn allocPrintCmd2( |
| 496 | 496 | opt_cwd: ?[]const u8, |
| 497 | 497 | opt_env: ?*const std.process.EnvMap, |
| 498 | 498 | argv: []const []const u8, |
| 499 | | ) ![]u8 { |
| 499 | ) Allocator.Error![]u8 { |
| 500 | 500 | var buf: std.ArrayListUnmanaged(u8) = .{}; |
| 501 | 501 | if (opt_cwd) |cwd| try buf.writer(arena).print("cd {s} && ", .{cwd}); |
| 502 | 502 | if (opt_env) |env| { |
| 503 | | const process_env_map = try std.process.getEnvMap(arena); |
| 503 | const process_env_map = std.process.getEnvMap(arena) catch std.process.EnvMap.init(arena); |
| 504 | 504 | var it = env.iterator(); |
| 505 | 505 | while (it.next()) |entry| { |
| 506 | 506 | const key = entry.key_ptr.*; |