Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
use zig lib dir for build runner (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnite authored May 11, 2022
1 parent 453e2f0 commit 0a0c0ba
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/commands.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0a0c0ba

Please sign in to comment.