Fix install_headers test on macOS (and possibly Linux)

This commit is contained in:
Carl Åstholm 2024-03-03 22:13:38 +01:00
parent 8ce3a8b604
commit 7b1a6a93a4
2 changed files with 3 additions and 3 deletions

View File

@ -12,12 +12,12 @@ pub fn main() !void {
_ = arg_it.next(); _ = arg_it.next();
const cwd = std.fs.cwd(); const cwd = std.fs.cwd();
const cwd_realpath = try cwd.realpathAlloc(arena, ""); const cwd_realpath = try cwd.realpathAlloc(arena, ".");
while (arg_it.next()) |file_path| { while (arg_it.next()) |file_path| {
if (file_path.len > 0 and file_path[0] == '!') { if (file_path.len > 0 and file_path[0] == '!') {
errdefer std.log.err( errdefer std.log.err(
"excluded file check '{s}{c}{s}' failed", "exclusive file check '{s}{c}{s}' failed",
.{ cwd_realpath, std.fs.path.sep, file_path[1..] }, .{ cwd_realpath, std.fs.path.sep, file_path[1..] },
); );
if (std.fs.cwd().statFile(file_path[1..])) |_| { if (std.fs.cwd().statFile(file_path[1..])) |_| {
@ -28,7 +28,7 @@ pub fn main() !void {
} }
} else { } else {
errdefer std.log.err( errdefer std.log.err(
"included file check '{s}{c}{s}' failed", "inclusive file check '{s}{c}{s}' failed",
.{ cwd_realpath, std.fs.path.sep, file_path }, .{ cwd_realpath, std.fs.path.sep, file_path },
); );
_ = try std.fs.cwd().statFile(file_path); _ = try std.fs.cwd().statFile(file_path);