| ... | @@ -2240,7 +2240,7 @@ pub const usage_build = | ... | @@ -2240,7 +2240,7 @@ pub const usage_build = |
| 2240 | pub fn cmdBuild(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !void { | 2240 | pub fn cmdBuild(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !void { |
| 2241 | // We want to release all the locks before executing the child process, so we make a nice | 2241 | // We want to release all the locks before executing the child process, so we make a nice |
| 2242 | // big block here to ensure the cleanup gets run when we extract out our argv. | 2242 | // big block here to ensure the cleanup gets run when we extract out our argv. |
| 2243 | const lock_and_argv = lock_and_argv: { | 2243 | const child_argv = argv: { |
| 2244 | const self_exe_path = try fs.selfExePathAlloc(arena); | 2244 | const self_exe_path = try fs.selfExePathAlloc(arena); |
| 2245 | | 2245 | |
| 2246 | var build_file: ?[]const u8 = null; | 2246 | var build_file: ?[]const u8 = null; |
| ... | @@ -2436,15 +2436,8 @@ pub fn cmdBuild(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !v | ... | @@ -2436,15 +2436,8 @@ pub fn cmdBuild(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !v |
| 2436 | &[_][]const u8{exe_basename}, | 2436 | &[_][]const u8{exe_basename}, |
| 2437 | ); | 2437 | ); |
| 2438 | | 2438 | |
| 2439 | break :lock_and_argv .{ | 2439 | break :argv child_argv.items; |
| 2440 | .child_argv = child_argv.items, | | |
| 2441 | .lock = comp.bin_file.toOwnedLock(), | | |
| 2442 | }; | | |
| 2443 | }; | 2440 | }; |
| 2444 | const child_argv = lock_and_argv.child_argv; | | |
| 2445 | var lock = lock_and_argv.lock; | | |
| 2446 | defer lock.release(); | | |
| 2447 | | | |
| 2448 | const child = try std.ChildProcess.init(child_argv, gpa); | 2441 | const child = try std.ChildProcess.init(child_argv, gpa); |
| 2449 | defer child.deinit(); | 2442 | defer child.deinit(); |
| 2450 | | 2443 | |