mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
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.
This commit is contained in:
parent
c102eb83e6
commit
fa09c3a5e7
@ -622,11 +622,13 @@ fn buildOutputType(
|
||||
i += 1;
|
||||
const pkg_path = args[i];
|
||||
|
||||
const new_cur_pkg = try Package.create(
|
||||
const new_cur_pkg = Package.create(
|
||||
gpa,
|
||||
fs.path.dirname(pkg_path),
|
||||
fs.path.basename(pkg_path),
|
||||
);
|
||||
) catch |err| {
|
||||
fatal("Failed to add package at path {}: {}", .{ pkg_path, @errorName(err) });
|
||||
};
|
||||
new_cur_pkg.parent = cur_pkg;
|
||||
try cur_pkg.add(gpa, pkg_name, new_cur_pkg);
|
||||
cur_pkg = new_cur_pkg;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user