authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-06-18 22:06:30 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-06-18 22:06:30 -07:00
log587247cef864cc8c0c20b439ce2865f194898fff
treee31f62dbd609a24000cb4af2f0d48047ba3e70fb
parentb72dd23d34b63a3648f7081295b233f9d969c4d2

cmd/fetch: generate licenses.txt too


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

src/cmd/fetch.zig+8
...@@ -5,6 +5,7 @@ const ansi = @import("ansi");...@@ -5,6 +5,7 @@ const ansi = @import("ansi");
5const zigmod = @import("../lib.zig");5const zigmod = @import("../lib.zig");
6const u = @import("./../util/index.zig");6const u = @import("./../util/index.zig");
7const common = @import("./../common.zig");7const common = @import("./../common.zig");
8const license = @import("./license.zig");
89
9//10//
10//11//
...@@ -31,6 +32,13 @@ pub fn execute(args: [][]u8) !void {...@@ -31,6 +32,13 @@ pub fn execute(args: [][]u8) !void {
31 try create_lockfile(gpa, &list, cachepath, dir);32 try create_lockfile(gpa, &list, cachepath, dir);
3233
33 try diff_lockfile(gpa);34 try diff_lockfile(gpa);
35
36 options.update = false;
37
38 var outfile = try dir.createFile("licenses.txt", .{});
39 defer outfile.close();
40
41 try license.do(cachepath, dir, &options, outfile);
34}42}
3543
36pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.Dir, top_module: zigmod.Module, list: *std.ArrayList(zigmod.Module)) !void {44pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.Dir, top_module: zigmod.Module, list: *std.ArrayList(zigmod.Module)) !void {