config: windows can't expand homedir (yet)

This commit is contained in:
Mitchell Hashimoto
2025-01-02 12:55:38 -08:00
parent a94cf4b3a2
commit d58b618c74

View File

@ -4365,7 +4365,10 @@ pub const RepeatablePath = struct {
// Check if the path starts with a tilde and expand it to the
// home directory on Linux/macOS. We explicitly look for "~/"
// because we don't support alternate users such as "~alice/"
if (std.mem.startsWith(u8, path, "~/")) {
if (std.mem.startsWith(u8, path, "~/")) expand: {
// Windows isn't supported yet
if (comptime builtin.os.tag == .windows) break :expand;
const expanded: []const u8 = internal_os.expandHome(
path,
&buf,