From 0a0c0ba0bd405080119fdc14ecc623a856515cac Mon Sep 17 00:00:00 2001 From: Matt Knight Date: Tue, 10 May 2022 21:51:15 -0700 Subject: [PATCH] use zig lib dir for build runner (#167) --- src/commands.zig | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/commands.zig b/src/commands.zig index 614c4239..7bee8d6f 100644 --- a/src/commands.zig +++ b/src/commands.zig @@ -202,19 +202,13 @@ pub fn build(allocator: Allocator, args: *std.process.ArgIterator) !void { ); defer std.json.parseFree(EnvInfo, env, parse_opts); - const path = try std.fs.path.join( - allocator, - &[_][]const u8{ env.std_dir, "special" }, - ); - defer allocator.free(path); - - var special_dir = try std.fs.openDirAbsolute( - path, + var zig_lib_dir = try std.fs.openDirAbsolute( + env.lib_dir, .{ .access_sub_paths = true }, ); - defer special_dir.close(); + defer zig_lib_dir.close(); - try special_dir.copyFile( + try zig_lib_dir.copyFile( "build_runner.zig", std.fs.cwd(), "build_runner.zig",