authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-20 21:02:02 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-20 21:02:02 -07:00
log54f71f216d9ee2ac3817374884d99690c690e161
tree3e5eb3da43d5914469d71303fdad2e647f2c8cce
parent0f954cb58570ff4ebafb644dbbd8ce6176a2ba74

cmd/license- print dependencies as actual urls instead of path stubs


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

src/cmd/license.zig+10-2
......@@ -66,7 +66,11 @@ pub fn execute(args: [][]u8) !void {
6666 }
6767 std.debug.print(style.ResetIntensity, .{});
6868 for (entry.value_ptr.*.items) |item| {
69 std.debug.print("- {s}\n", .{if (!std.mem.eql(u8, item.clean_path, "../..")) item.clean_path else "This"});
69 if (std.mem.eql(u8, item.clean_path, "../..")) {
70 std.debug.print("- This\n", .{});
71 } else {
72 std.debug.print("- {s} {s}\n", .{ @tagName(item.dep.?.type), item.dep.?.path });
73 }
7074 }
7175 std.debug.print("\n", .{});
7276 }
......@@ -74,7 +78,11 @@ pub fn execute(args: [][]u8) !void {
7478 std.debug.print(style.Bold ++ "Unspecified:\n", .{});
7579 std.debug.print(style.ResetIntensity, .{});
7680 for (unspecified_list.items) |item| {
77 std.debug.print("- {s}\n", .{if (!std.mem.eql(u8, item.clean_path, "../..")) item.clean_path else "This"});
81 if (std.mem.eql(u8, item.clean_path, "../..")) {
82 std.debug.print("- This\n", .{});
83 } else {
84 std.debug.print("- {s} {s}\n", .{ @tagName(item.dep.?.type), item.dep.?.path });
85 }
7886 }
7987 }
8088}