mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-21 19:26:09 +03:00
passwd entry in flatpak needs to trim newlines
This commit is contained in:
@ -72,7 +72,7 @@ pub fn get(alloc: Allocator) !Entry {
|
|||||||
});
|
});
|
||||||
if (exec.term == .Exited) {
|
if (exec.term == .Exited) {
|
||||||
// Shell and home are the last two entries
|
// 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.shell = it.next() orelse null;
|
||||||
result.home = it.next() orelse null;
|
result.home = it.next() orelse null;
|
||||||
return result;
|
return result;
|
||||||
|
Reference in New Issue
Block a user