From d04745ad63f088376557dc7e2905759345ac6e08 Mon Sep 17 00:00:00 2001 From: utox39 Date: Wed, 11 Feb 2026 19:01:02 +0100 Subject: [PATCH] refactor(macos-shell): use process.run function --- 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 372ec7d..8ae78c0 100644 --- a/src/macos/user.zig +++ b/src/macos/user.zig @@ -7,14 +7,14 @@ 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, environ: std.process.Environ) ![]u8 { +pub fn getShell(allocator: std.mem.Allocator, io: std.Io, 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; defer allocator.free(shell); - const result = try std.process.Child.run(.{ .allocator = allocator, .argv = &[_][]const u8{ shell, "--version" } }); + const result = try std.process.run(allocator, io, .{ .argv = &[_][]const u8{ shell, "--version" } }); const result_stdout = result.stdout; if (std.mem.indexOf(u8, shell, "bash") != null) {