authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-28 11:32:04 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-28 11:32:04 -08:00
logfc45e9b7d91e3d0e010650fd12ac4ced2234d5de
treecb51b972e1c16fb198c9610060542e4a7ee8952f
parent36cbab3db222c092a51084b1532e5b199de23199

use path.join instead of string concat


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

src/cmd_fetch.zig+1-1
......@@ -10,7 +10,7 @@ const u = @import("./util/index.zig");
1010pub fn execute(args: [][]u8) !void {
1111 //
1212 const home = try known_folders.getPath(gpa, .home);
13 const dir = try std.fmt.allocPrint(gpa, "{}{}", .{home, "/.cache/zigmod"});
13 const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod"});
1414
1515 const top_module = try fetch_deps(dir, "./zig.mod");
1616
src/cmd_sum.zig+1-1
......@@ -11,7 +11,7 @@ const common = @import("./common.zig");
1111pub fn execute(args: [][]u8) !void {
1212 //
1313 const home = try known_folders.getPath(gpa, .home);
14 const dir = try std.fmt.allocPrint(gpa, "{}{}", .{home, "/.cache/zigmod"});
14 const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod"});
1515 const top_module = try common.collect_deps(dir, "./zig.mod");
1616
1717 //