| ... | ... | @@ -1276,15 +1276,15 @@ pub fn buildOutputType( |
| 1276 | 1276 | defer if (cleanup_root_dir) |*dir| dir.close(); |
| 1277 | 1277 | |
| 1278 | 1278 | const root_pkg: ?*Package = if (root_src_file) |src_path| blk: { |
| 1279 | | root_pkg_memory.root_src_directory = m: { |
| 1280 | | if (main_pkg_path) |p| { |
| 1281 | | const dir = try fs.cwd().openDir(p, .{}); |
| 1282 | | cleanup_root_dir = dir; |
| 1283 | | break :m .{ .path = p, .handle = dir }; |
| 1284 | | } |
| 1285 | | break :m .{ .path = null, .handle = fs.cwd() }; |
| 1286 | | }; |
| 1287 | | root_pkg_memory.root_src_path = src_path; |
| 1279 | if (main_pkg_path) |p| { |
| 1280 | const dir = try fs.cwd().openDir(p, .{}); |
| 1281 | cleanup_root_dir = dir; |
| 1282 | root_pkg_memory.root_src_directory = .{ .path = p, .handle = dir }; |
| 1283 | root_pkg_memory.root_src_path = try fs.path.relative(arena, p, src_path); |
| 1284 | } else { |
| 1285 | root_pkg_memory.root_src_directory = .{ .path = null, .handle = fs.cwd() }; |
| 1286 | root_pkg_memory.root_src_path = src_path; |
| 1287 | } |
| 1288 | 1288 | break :blk &root_pkg_memory; |
| 1289 | 1289 | } else null; |
| 1290 | 1290 | |