make sure exe exists
This commit is contained in:
parent
aaab68bb9d
commit
5b50d98353
@ -1579,6 +1579,11 @@ pub fn main() anyerror!void {
|
|||||||
if (config.zig_exe_path) |exe_path| {
|
if (config.zig_exe_path) |exe_path| {
|
||||||
if (std.fs.path.isAbsolute(exe_path)) {
|
if (std.fs.path.isAbsolute(exe_path)) {
|
||||||
zig_exe_path = try std.mem.dupe(allocator, u8, exe_path);
|
zig_exe_path = try std.mem.dupe(allocator, u8, exe_path);
|
||||||
|
// make sure the path still exists
|
||||||
|
if (blk: {
|
||||||
|
std.fs.cwd().access(zig_exe_path.?, .{}) catch break :blk false;
|
||||||
|
break :blk true;
|
||||||
|
})
|
||||||
break :find_zig;
|
break :find_zig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user