From 5771e032812cdd3f3ec9eab90878e9bd6fac3fa0 Mon Sep 17 00:00:00 2001 From: utox39 Date: Wed, 11 Feb 2026 18:57:34 +0100 Subject: [PATCH] refactor(macos-shell): use new Environ --- src/macos/user.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/macos/user.zig b/src/macos/user.zig index 216e769..372ec7d 100644 --- a/src/macos/user.zig +++ b/src/macos/user.zig @@ -7,8 +7,8 @@ pub fn getUsername(allocator: std.mem.Allocator, environ: std.process.Environ) ! return try std.process.Environ.getAlloc(environ, allocator, "USER"); } -pub fn getShell(allocator: std.mem.Allocator) ![]u8 { - const shell = std.process.getEnvVarOwned(allocator, "SHELL") catch |err| if (err == error.EnvironmentVariableNotFound) { +pub fn getShell(allocator: std.mem.Allocator, environ: std.process.Environ) ![]u8 { + const shell = std.process.Environ.getAlloc(environ, allocator, "SHELL") catch |err| if (err == error.EnvironmentVariableNotFound) { return allocator.dupe(u8, "Unknown"); } else return err;