on windows the env var for home seems to be HOMEPATH
This commit is contained in:
@@ -266,7 +266,7 @@ fn configLocation(allocator: Allocator) ![]const u8 {
|
||||
return config_location;
|
||||
}
|
||||
|
||||
const home = std.process.getEnvVarOwned(allocator, "HOME") catch null;
|
||||
const home = std.process.getEnvVarOwned(allocator, "HOME") catch std.process.getEnvVarOwned(allocator, "HOMEPATH") catch null;
|
||||
const base = home orelse unreachable;
|
||||
const config_location = try std.mem.concat(allocator, u8, &[_][]const u8{ base, "/.zig-totp" });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user