Skip folder named zig while searching for zig executable on *nix
This commit is contained in:
parent
b208a33286
commit
60ad93ca34
@ -37,8 +37,8 @@ pub fn config(step: *std.build.Step) anyerror!void {
|
||||
// Skip folders named zig
|
||||
const file = std.fs.openFileAbsolute(full_path, .{}) catch continue;
|
||||
const stat = file.stat() catch continue;
|
||||
const is_dir = stat.kind == .Directory ;
|
||||
if(is_dir) continue ;
|
||||
const is_dir = stat.kind == .Directory;
|
||||
if (is_dir) continue;
|
||||
|
||||
var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined;
|
||||
zig_exe_path = try std.mem.dupe(allocator, u8, std.os.realpath(full_path, &buf) catch continue);
|
||||
|
Loading…
Reference in New Issue
Block a user