From ec75712d04dc8dfacaa1b313c1187d711158abe8 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 20 Sep 2024 15:29:30 +0200 Subject: [PATCH] on windows the env var for home seems to be HOMEPATH --- src/main.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index 5ac136e..f95bffb 100644 --- a/src/main.zig +++ b/src/main.zig @@ -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" });