std: migrate getcwd to Io

progress towards #30150
This commit is contained in:
Andrew Kelley 2026-01-28 19:40:43 -08:00
parent 9b415761dd
commit 649aaf4814
24 changed files with 125 additions and 157 deletions

View file

@ -33,7 +33,7 @@ pub fn main(init: std.process.Init) !void {
const arena = init.arena.allocator();
const io = init.io;
const environ_map = init.environ_map;
const cwd_path = try std.process.getCwdAlloc(arena);
const cwd_path = try std.process.currentDirAlloc(io, arena);
try environ_map.put("CLICOLOR_FORCE", "1");

View file

@ -32,7 +32,7 @@ pub fn main(init: std.process.Init) !void {
const arena = init.arena.allocator();
const io = init.io;
const environ_map = init.environ_map;
const cwd_path = try std.process.getCwdAlloc(arena);
const cwd_path = try std.process.currentDirAlloc(io, arena);
var opt_zig_exe: ?[]const u8 = null;
var opt_input_file_name: ?[]const u8 = null;

View file

@ -145,7 +145,7 @@ pub fn main(init: std.process.Init) !void {
const arena = init.arena.allocator();
const io = init.io;
const args = try init.minimal.args.toSlice(arena);
const cwd_path = try std.process.getCwdAlloc(arena);
const cwd_path = try std.process.currentDirAlloc(io, arena);
const environ_map = init.environ_map;
var search_paths = std.array_list.Managed([]const u8).init(arena);

View file

@ -146,7 +146,7 @@ pub fn main(init: std.process.Init) !void {
const io = init.io;
const args = try init.minimal.args.toSlice(arena);
const environ_map = init.environ_map;
const cwd = try std.process.getCwdAlloc(arena);
const cwd = try std.process.currentDirAlloc(io, arena);
var search_paths = std.array_list.Managed([]const u8).init(arena);
var opt_out_dir: ?[]const u8 = null;