diff --git a/src/common.zig b/src/common.zig index 80d6c7cec91174255e22bd026d1d7bbdfd503a1f..e815f34d7f16c1e3bb8ca3b1740bbe1097954848 100644 --- a/src/common.zig +++ b/src/common.zig @@ -1,10 +1,16 @@ const std = @import("std"); const gpa = std.heap.c_allocator; +const ansi = @import("ansi"); + const u = @import("./util/index.zig"); const yaml = @import("./util/yaml.zig"); const string = []const u8; +const root = @import("root"); +const build_options = if (@hasDecl(root, "build_options")) root.build_options else struct {}; +const bootstrap = if (@hasDecl(build_options, "bootstrap")) build_options.bootstrap else false; + // // @@ -97,6 +103,12 @@ fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, options: * if (options.log and d.type != .local) { u.print("fetch: {s}: {s}: {s}", .{ parent_name, @tagName(d.type), d.path }); } + defer { + if (!bootstrap and options.log and d.type != .local) { + std.debug.print("{s}", .{ansi.csi.CursorUp(1)}); + std.debug.print("{s}", .{ansi.csi.EraseInLine(0)}); + } + } switch (d.type) { .local => { if (!std.mem.endsWith(u8, d.main, ".zig")) {