river: error out if default init is not executable
This commit is contained in:
parent
a413790158
commit
37da205be0
@ -140,6 +140,12 @@ fn defaultInitPath() !?[:0]const u8 {
|
||||
};
|
||||
|
||||
os.accessZ(path, os.X_OK) catch |err| {
|
||||
if (err == error.PermissionDenied) {
|
||||
if (os.accessZ(path, os.R_OK)) {
|
||||
std.log.err("failed to run init executable {s}: the file is not executable", .{path});
|
||||
os.exit(1);
|
||||
} else |_| {}
|
||||
}
|
||||
std.log.err("failed to run init executable {s}: {s}", .{ path, @errorName(err) });
|
||||
util.gpa.free(path);
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user