authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-24 00:17:38 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-11-24 00:17:38 -08:00
loga1ea508279920f457c5f899022046fefd6dc146a
tree18a61448a154d414dda00f8b5195c6057203abea
parent09d633b1405c5cbd4e02f4c86cb34f0368bf321f

main: pass proper self_path value


1 files changed, 2 insertions(+), 1 deletions(-)

src/main.zig+2-1
......@@ -13,6 +13,7 @@ pub fn main() !void {
1313
1414 const proc_args = try std.process.argsAlloc(gpa);
1515 const args = proc_args[1..];
16 const self_path = try std.fs.selfExePathAlloc(gpa);
1617
1718 if (args.len == 0) {
1819 std.debug.print("zigmod {s} {s} {s} {s}\n", .{
......@@ -45,7 +46,7 @@ pub fn main() !void {
4546 inline for (comptime std.meta.declarations(zigmod.commands)) |decl| {
4647 if (std.mem.eql(u8, args[0], decl.name)) {
4748 const cmd = @field(zigmod.commands, decl.name);
48 try cmd.execute(proc_args[0], args[1..]);
49 try cmd.execute(self_path, args[1..]);
4950 return;
5051 }
5152 }