authorgravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2020-12-17 20:03:15+01:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2020-12-17 20:03:15+01:00
logfa09c3a5e7ab855026ae10f9e1f61b05611a2275
tree273d74755c2e83c3e282f5de3e16464cff97d59b
parentc102eb83e6ab4c3a6cbcecf87964150c0b3df463
signaturelock-open Commit is signed but in an unrecognized format.

stage2: print package path on --pkg-begin failure

This makes it much easier for the user to figure out what has gone wrong than dumping an error return trace.

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

src/main.zig+4-2
......@@ -622,11 +622,13 @@ fn buildOutputType(
622622 i += 1;
623623 const pkg_path = args[i];
624624
625 const new_cur_pkg = try Package.create(
625 const new_cur_pkg = Package.create(
626626 gpa,
627627 fs.path.dirname(pkg_path),
628628 fs.path.basename(pkg_path),
629 );
629 ) catch |err| {
630 fatal("Failed to add package at path {}: {}", .{ pkg_path, @errorName(err) });
631 };
630632 new_cur_pkg.parent = cur_pkg;
631633 try cur_pkg.add(gpa, pkg_name, new_cur_pkg);
632634 cur_pkg = new_cur_pkg;