mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
std.process: currentDir -> currentPath
In Zig standard library, Dir means an open directory handle. path represents a file system identifier string. This function is better named after "current path" than "current dir". "get" and "working" are superfluous.
This commit is contained in:
+1
-1
@@ -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.currentDirAlloc(io, arena);
|
||||
const cwd_path = try std.process.currentPathAlloc(io, arena);
|
||||
|
||||
try environ_map.put("CLICOLOR_FORCE", "1");
|
||||
|
||||
|
||||
@@ -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.currentDirAlloc(io, arena);
|
||||
const cwd_path = try std.process.currentPathAlloc(io, arena);
|
||||
|
||||
var opt_zig_exe: ?[]const u8 = null;
|
||||
var opt_input_file_name: ?[]const u8 = null;
|
||||
|
||||
@@ -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.currentDirAlloc(io, arena);
|
||||
const cwd_path = try std.process.currentPathAlloc(io, arena);
|
||||
const environ_map = init.environ_map;
|
||||
|
||||
var search_paths = std.array_list.Managed([]const u8).init(arena);
|
||||
|
||||
@@ -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.currentDirAlloc(io, arena);
|
||||
const cwd = try std.process.currentPathAlloc(io, arena);
|
||||
|
||||
var search_paths = std.array_list.Managed([]const u8).init(arena);
|
||||
var opt_out_dir: ?[]const u8 = null;
|
||||
|
||||
Reference in New Issue
Block a user