diff options
author | 2021-12-28 03:35:03 -0800 | |
---|---|---|
committer | 2021-12-28 03:35:03 -0800 | |
commit | 6f4d48cc6cf01e10bcae1b0be85920791c7a7fd6 (patch) | |
tree | 1d1fd167190655e8c96330ee730b2ca82d15f68a | |
parent | fb34ebc674d099209963d9c1d5eccbd1726d3b5d (diff) | |
download | bun-6f4d48cc6cf01e10bcae1b0be85920791c7a7fd6.tar.gz bun-6f4d48cc6cf01e10bcae1b0be85920791c7a7fd6.tar.zst bun-6f4d48cc6cf01e10bcae1b0be85920791c7a7fd6.zip |
[bun run] revert changebun-v0.0.62
-rw-r--r-- | build-id | 2 | ||||
-rw-r--r-- | src/which.zig | 3 |
2 files changed, 2 insertions, 3 deletions
@@ -1 +1 @@ -61 +62 diff --git a/src/which.zig b/src/which.zig index 50c82c05d..69377df63 100644 --- a/src/which.zig +++ b/src/which.zig @@ -9,8 +9,7 @@ fn isValid(buf: *[std.fs.MAX_PATH_BYTES]u8, segment: []const u8, bin: []const u8 var stat = std.mem.zeroes(std.os.Stat); // we cannot use access() here even though all we want to do now here is check it is executable // directories can be considered executable - if (std.c.stat(filepath, &stat) != 0) return null; - if (stat.mode & std.os.S_IXUSR == 0 or !(std.os.S_ISLNK(stat.mode) or std.os.S_ISREG(stat.mode))) return null; + std.os.accessZ(filepath, std.os.X_OK) catch return null; return @intCast(u16, filepath.len); } |