| ... | ... | @@ -1154,13 +1154,12 @@ fn allocPrintCmd(ally: Allocator, opt_cwd: ?[]const u8, argv: []const []const u8 |
| 1154 | 1154 | for (argv) |arg| { |
| 1155 | 1155 | try buf.writer().print("{s} ", .{arg}); |
| 1156 | 1156 | } |
| 1157 | | try buf.append('\n'); |
| 1158 | 1157 | return buf.toOwnedSlice(); |
| 1159 | 1158 | } |
| 1160 | 1159 | |
| 1161 | 1160 | fn printCmd(ally: Allocator, cwd: ?[]const u8, argv: []const []const u8) void { |
| 1162 | 1161 | const text = allocPrintCmd(ally, cwd, argv) catch @panic("OOM"); |
| 1163 | | std.debug.print("{s}", .{text}); |
| 1162 | std.debug.print("{s}\n", .{text}); |
| 1164 | 1163 | } |
| 1165 | 1164 | |
| 1166 | 1165 | pub fn spawnChildEnvMap(self: *Build, cwd: ?[]const u8, env_map: *const EnvMap, argv: []const []const u8) !void { |
| ... | ... | @@ -1482,7 +1481,7 @@ pub fn execFromStep(b: *Build, argv: []const []const u8, s: *Step) ![]const u8 { |
| 1482 | 1481 | @panic("TODO handle progress message"); |
| 1483 | 1482 | }, |
| 1484 | 1483 | .emit_bin_path => { |
| 1485 | | @panic("TODO handle emit_bin_path message"); |
| 1484 | result = try b.allocator.dupe(u8, body); |
| 1486 | 1485 | }, |
| 1487 | 1486 | _ => { |
| 1488 | 1487 | // Unrecognized message. |
| ... | ... | @@ -1553,7 +1552,7 @@ fn sendMessage(file: fs.File, tag: std.zig.Client.Message.Tag) !void { |
| 1553 | 1552 | /// a helpful message. |
| 1554 | 1553 | pub fn exec(b: *Build, argv: []const []const u8) []u8 { |
| 1555 | 1554 | if (!process.can_spawn) { |
| 1556 | | std.debug.print("unable to spawn the following command: cannot spawn child process\n{s}", .{ |
| 1555 | std.debug.print("unable to spawn the following command: cannot spawn child process\n{s}\n", .{ |
| 1557 | 1556 | try allocPrintCmd(b.allocator, null, argv), |
| 1558 | 1557 | }); |
| 1559 | 1558 | process.exit(1); |
| ... | ... | @@ -1562,7 +1561,7 @@ pub fn exec(b: *Build, argv: []const []const u8) []u8 { |
| 1562 | 1561 | var code: u8 = undefined; |
| 1563 | 1562 | return b.execAllowFail(argv, &code, .Inherit) catch |err| { |
| 1564 | 1563 | const printed_cmd = allocPrintCmd(b.allocator, null, argv) catch @panic("OOM"); |
| 1565 | | std.debug.print("unable to spawn the following command: {s}\n{s}", .{ |
| 1564 | std.debug.print("unable to spawn the following command: {s}\n{s}\n", .{ |
| 1566 | 1565 | @errorName(err), printed_cmd, |
| 1567 | 1566 | }); |
| 1568 | 1567 | process.exit(1); |