mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 23:24:09 +00:00
fixed pkghash
This commit is contained in:
parent
e74cfdfc78
commit
d9b3c528e9
1 changed files with 8 additions and 1 deletions
|
@ -196,7 +196,11 @@ pub fn cmdPkgGit(gpa: Allocator, args: []const []const u8) !void {
|
|||
}
|
||||
}
|
||||
|
||||
defer gpa.free(git_tag.?);
|
||||
errdefer {
|
||||
if (git_tag) |g| {
|
||||
gpa.free(g);
|
||||
}
|
||||
}
|
||||
|
||||
const hash = blk: {
|
||||
const result = try gitFileList(gpa, cwd_absolute_path);
|
||||
|
@ -222,6 +226,9 @@ pub fn cmdPkgGit(gpa: Allocator, args: []const []const u8) !void {
|
|||
} else {
|
||||
try renderTemplate(gpa, git_tag.?, template_filn.?, digest_slice);
|
||||
}
|
||||
if (git_tag) |g| {
|
||||
gpa.free(g);
|
||||
}
|
||||
}
|
||||
|
||||
fn renderTemplate(gpa: std.mem.Allocator, tag: []const u8, template: []const u8, hash: []const u8) !void {
|
||||
|
|
Loading…
Add table
Reference in a new issue