| author | |
| committer | |
| log | 76953c858cf2de793a44add7a50a1ae47067a3a7 |
| tree | ceee276bff82102ab1f2c6811084fc4d2338d350 |
| parent | 07a3c632b5c651f4c1d1a7147e3f0e17c99b6804 |
2 files changed, 5 insertions(+), 4 deletions(-)
src/cmd_fetch.zig+2-2| ... | @@ -69,8 +69,8 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module { | ... | @@ -69,8 +69,8 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module { |
| 69 | const moduledeps = &std.ArrayList(u.Module).init(gpa); | 69 | const moduledeps = &std.ArrayList(u.Module).init(gpa); |
| 70 | var moddir: []const u8 = undefined; | 70 | var moddir: []const u8 = undefined; |
| 71 | for (m.deps) |d| { | 71 | for (m.deps) |d| { |
| 72 | const p = try u.concat(&[_][]const u8{dir, "/", try d.clean_path()}); | 72 | const p = try fs.path.join(gpa, &[_][]const u8{dir, try d.clean_path()}); |
| 73 | const pv = try u.concat(&[_][]const u8{dir, "/v/", try d.clean_path(), "/", d.version}); | 73 | const pv = try fs.path.join(gpa, &[_][]const u8{dir, "v", try d.clean_path(), d.version}); |
| 74 | u.print("fetch: {}: {}: {}", .{m.name, @tagName(d.type), d.path}); | 74 | u.print("fetch: {}: {}: {}", .{m.name, @tagName(d.type), d.path}); |
| 75 | moddir = p; | 75 | moddir = p; |
| 76 | switch (d.type) { | 76 | switch (d.type) { |
src/common.zig+3-2| ... | @@ -1,5 +1,6 @@ | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const gpa = std.heap.c_allocator; | 2 | const gpa = std.heap.c_allocator; |
| 3 | const fs = std.fs; | ||
| 3 | 4 | ||
| 4 | const u = @import("./util/index.zig"); | 5 | const u = @import("./util/index.zig"); |
| 5 | 6 | ||
| ... | @@ -11,8 +12,8 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module { | ... | @@ -11,8 +12,8 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module { |
| 11 | const moduledeps = &std.ArrayList(u.Module).init(gpa); | 12 | const moduledeps = &std.ArrayList(u.Module).init(gpa); |
| 12 | var moddir: []const u8 = undefined; | 13 | var moddir: []const u8 = undefined; |
| 13 | for (m.deps) |d| { | 14 | for (m.deps) |d| { |
| 14 | const p = try u.concat(&[_][]const u8{dir, "/", try d.clean_path()}); | 15 | const p = try fs.path.join(gpa, &[_][]const u8{dir, try d.clean_path()}); |
| 15 | const pv = try u.concat(&[_][]const u8{dir, "/v/", try d.clean_path(), "/", d.version}); | 16 | const pv = try fs.path.join(gpa, &[_][]const u8{dir, "v", try d.clean_path(), d.version}); |
| 16 | if (try u.does_file_exist(pv)) { | 17 | if (try u.does_file_exist(pv)) { |
| 17 | moddir = pv; | 18 | moddir = pv; |
| 18 | } else { | 19 | } else { |