authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2021-01-07 12:55:44 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2021-01-07 12:55:44 -08:00
log8dd11fb82ad5f8befd8a6dd91f2aa9321a18d956
tree3539a38835b11465c9b319d58140a2e1d9845645
parent0447b40cb611060090f8f9c347d01711fc31b6e3

store dependencies relative to build root instead of globally


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

src/cmd_fetch.zig+1-2
......@@ -10,8 +10,7 @@ const u = @import("./util/index.zig");
1010
1111pub fn execute(args: [][]u8) !void {
1212 //
13 const home = try known_folders.getPath(gpa, .home);
14 const dir = try fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod", "deps"});
13 const dir = try fs.path.join(gpa, &[_][]const u8{".zigmod", "deps"});
1514
1615 const top_module = try fetch_deps(dir, "zig.mod");
1716
src/util/funcs.zig+1-1
......@@ -135,7 +135,7 @@ pub fn list_contains(haystack: [][]const u8, needle: []const u8) bool {
135135
136136pub fn open_dir_absolute(dpath: []const u8) !std.fs.Dir {
137137 return std.fs.Dir{
138 .fd = (try std.fs.openFileAbsolute(dpath, .{})).handle,
138 .fd = (try std.fs.cwd().openFile(dpath, .{})).handle,
139139 };
140140}
141141