| ... | ... | @@ -68,19 +68,19 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module { |
| 68 | 68 | switch (d.type) { |
| 69 | 69 | .git => { |
| 70 | 70 | if (!try u.does_file_exist(p)) { |
| 71 | | try run_cmd(null, &[_][]const u8{"git", "clone", d.path, p}); |
| 71 | _ = try run_cmd(null, &[_][]const u8{"git", "clone", d.path, p}); |
| 72 | 72 | } |
| 73 | 73 | else { |
| 74 | | try run_cmd(p, &[_][]const u8{"git", "fetch"}); |
| 75 | | try run_cmd(p, &[_][]const u8{"git", "pull"}); |
| 74 | _ = try run_cmd(p, &[_][]const u8{"git", "fetch"}); |
| 75 | _ = try run_cmd(p, &[_][]const u8{"git", "pull"}); |
| 76 | 76 | } |
| 77 | 77 | }, |
| 78 | 78 | .hg => { |
| 79 | 79 | if (!try u.does_file_exist(p)) { |
| 80 | | try run_cmd(null, &[_][]const u8{"hg", "clone", d.path, p}); |
| 80 | _= try run_cmd(null, &[_][]const u8{"hg", "clone", d.path, p}); |
| 81 | 81 | } |
| 82 | 82 | else { |
| 83 | | try run_cmd(p, &[_][]const u8{"hg", "pull"}); |
| 83 | _= try run_cmd(p, &[_][]const u8{"hg", "pull"}); |
| 84 | 84 | } |
| 85 | 85 | }, |
| 86 | 86 | } |
| ... | ... | @@ -116,13 +116,15 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module { |
| 116 | 116 | }; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | | fn run_cmd(dir: ?[]const u8, args: []const []const u8) !void { |
| 120 | | _ = std.ChildProcess.exec(.{ .allocator = gpa, .cwd = dir, .argv = args, }) catch |e| switch(e) { |
| 119 | fn run_cmd(dir: ?[]const u8, args: []const []const u8) !u32 { |
| 120 | const result = std.ChildProcess.exec(.{ .allocator = gpa, .cwd = dir, .argv = args, }) catch |e| switch(e) { |
| 121 | 121 | error.FileNotFound => { |
| 122 | 122 | u.assert(false, "\"{}\" command not found", .{args[0]}); |
| 123 | unreachable; |
| 123 | 124 | }, |
| 124 | 125 | else => return e, |
| 125 | 126 | }; |
| 127 | return result.term.Exited; |
| 126 | 128 | } |
| 127 | 129 | |
| 128 | 130 | fn print_deps(w: std.fs.File.Writer, dir: []const u8, m: u.Module, tabs: i32) anyerror!void { |