Try to create /etc/pam.d and /usr/bin everytime when installing

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion 2025-03-05 22:36:17 +01:00
parent 85e071a60a
commit 87503367e9
No known key found for this signature in database
1 changed files with 8 additions and 8 deletions

View File

@ -232,11 +232,11 @@ fn install_ly(allocator: std.mem.Allocator, install_config: bool) !void {
{
const exe_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, prefix_directory, "/bin" });
if (!std.mem.eql(u8, dest_directory, "")) {
std.fs.cwd().makePath(exe_path) catch {
std.fs.cwd().makePath(exe_path) catch {
if (!std.mem.eql(u8, dest_directory, "")) {
std.debug.print("warn: {s} already exists as a directory.\n", .{exe_path});
};
}
}
};
var executable_dir = std.fs.cwd().openDir(exe_path, .{}) catch unreachable;
defer executable_dir.close();
@ -295,11 +295,11 @@ fn install_ly(allocator: std.mem.Allocator, install_config: bool) !void {
{
const pam_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, config_directory, "/pam.d" });
if (!std.mem.eql(u8, dest_directory, "")) {
std.fs.cwd().makePath(pam_path) catch {
std.fs.cwd().makePath(pam_path) catch {
if (!std.mem.eql(u8, dest_directory, "")) {
std.debug.print("warn: {s} already exists as a directory.\n", .{pam_path});
};
}
}
};
var pam_dir = std.fs.cwd().openDir(pam_path, .{}) catch unreachable;
defer pam_dir.close();