authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-23 23:59:05 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-23 23:59:05 -07:00
logc9752714e5a141f4bf6e8816900e2b13d1cda271
tree57dd72122b1173d1feb1df49d7fdb1d68f8c2d72
parent51801e4261c17f4bc765e928d9a17793e2afd8a4

cmd/fetch- clear line if not in bootstrap mode


1 files changed, 12 insertions(+), 0 deletions(-)

src/common.zig+12
......@@ -1,10 +1,16 @@
11const std = @import("std");
22const gpa = std.heap.c_allocator;
33
4const ansi = @import("ansi");
5
46const u = @import("./util/index.zig");
57const yaml = @import("./util/yaml.zig");
68const string = []const u8;
79
10const root = @import("root");
11const build_options = if (@hasDecl(root, "build_options")) root.build_options else struct {};
12const bootstrap = if (@hasDecl(build_options, "bootstrap")) build_options.bootstrap else false;
13
814//
915//
1016
......@@ -97,6 +103,12 @@ fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, options: *
97103 if (options.log and d.type != .local) {
98104 u.print("fetch: {s}: {s}: {s}", .{ parent_name, @tagName(d.type), d.path });
99105 }
106 defer {
107 if (!bootstrap and options.log and d.type != .local) {
108 std.debug.print("{s}", .{ansi.csi.CursorUp(1)});
109 std.debug.print("{s}", .{ansi.csi.EraseInLine(0)});
110 }
111 }
100112 switch (d.type) {
101113 .local => {
102114 if (!std.mem.endsWith(u8, d.main, ".zig")) {