From f012d31ed5b15ca3342ae99987c81e52481da9bd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 25 Feb 2023 22:25:17 -0800 Subject: [PATCH] passwd entry in flatpak needs to trim newlines --- src/passwd.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/passwd.zig b/src/passwd.zig index d44ca8900..33c93e5f0 100644 --- a/src/passwd.zig +++ b/src/passwd.zig @@ -72,7 +72,7 @@ pub fn get(alloc: Allocator) !Entry { }); if (exec.term == .Exited) { // Shell and home are the last two entries - var it = std.mem.splitBackwards(u8, exec.stdout, ":"); + var it = std.mem.splitBackwards(u8, std.mem.trimRight(u8, exec.stdout, " \r\n"), ":"); result.shell = it.next() orelse null; result.home = it.next() orelse null; return result;