mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 08:16:13 +03:00
shuffle some code
This commit is contained in:
@ -1134,7 +1134,8 @@ pub fn finalize(self: *Config) !void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (builtin.target.os.tag == .windows) {
|
switch (builtin.os.tag) {
|
||||||
|
.windows => {
|
||||||
if (self.command == null) {
|
if (self.command == null) {
|
||||||
log.warn("no default shell found, will default to using cmd", .{});
|
log.warn("no default shell found, will default to using cmd", .{});
|
||||||
self.command = "cmd.exe";
|
self.command = "cmd.exe";
|
||||||
@ -1146,7 +1147,9 @@ pub fn finalize(self: *Config) !void {
|
|||||||
self.@"working-directory" = try alloc.dupe(u8, home);
|
self.@"working-directory" = try alloc.dupe(u8, home);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
},
|
||||||
|
|
||||||
|
else => {
|
||||||
// We need the passwd entry for the remainder
|
// We need the passwd entry for the remainder
|
||||||
const pw = try internal_os.passwd.get(alloc);
|
const pw = try internal_os.passwd.get(alloc);
|
||||||
if (self.command == null) {
|
if (self.command == null) {
|
||||||
@ -1166,6 +1169,7 @@ pub fn finalize(self: *Config) !void {
|
|||||||
if (self.command == null) {
|
if (self.command == null) {
|
||||||
log.warn("no default shell found, will default to using sh", .{});
|
log.warn("no default shell found, will default to using sh", .{});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,7 @@ fn homeWindows(buf: []u8) !?[]u8 {
|
|||||||
if (homepath.ptr != path_buf.ptr) @panic("codebug");
|
if (homepath.ptr != path_buf.ptr) @panic("codebug");
|
||||||
break :blk homepath.len;
|
break :blk homepath.len;
|
||||||
};
|
};
|
||||||
|
|
||||||
return buf[0 .. drive_len + path_len];
|
return buf[0 .. drive_len + path_len];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user