From 525156f4c6ed6db82a726a0a6bc73198672fbf7f Mon Sep 17 00:00:00 2001 From: utox39 Date: Wed, 11 Feb 2026 18:33:41 +0100 Subject: [PATCH] refactor(macos-system): use new Environ method --- src/macos/system.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macos/system.zig b/src/macos/system.zig index f0aff01..179d34b 100644 --- a/src/macos/system.zig +++ b/src/macos/system.zig @@ -25,8 +25,8 @@ pub fn getHostname(allocator: std.mem.Allocator) ![]u8 { return hostname; } -pub fn getLocale(allocator: std.mem.Allocator) ![]u8 { - const locale = std.process.getEnvVarOwned(allocator, "LANG") catch |err| if (err == error.EnvironmentVariableNotFound) { +pub fn getLocale(allocator: std.mem.Allocator, environ: std.process.Environ) ![]u8 { + const locale = std.process.Environ.getAlloc(environ, allocator, "LANG") catch |err| if (err == error.EnvironmentVariableNotFound) { return allocator.dupe(u8, "Unknown"); } else return err; return locale;