mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 05:12:29 +00:00
cleanup error printing
This commit is contained in:
@@ -308,8 +308,10 @@ pub const Arguments = struct {
|
||||
.allocator = allocator,
|
||||
}) catch |err| {
|
||||
// Report useful error and exit
|
||||
clap.help(Output.errorWriter(), ¶ms) catch {};
|
||||
Output.errorWriter().writeAll("\n") catch {};
|
||||
diag.report(Output.errorWriter(), err) catch {};
|
||||
return err;
|
||||
Global.exit(1);
|
||||
};
|
||||
|
||||
if (args.flag("--version")) {
|
||||
|
||||
@@ -3401,7 +3401,8 @@ pub const PackageManager = struct {
|
||||
.diagnostic = &diag,
|
||||
.allocator = allocator,
|
||||
}) catch |err| {
|
||||
// Report useful error and exit
|
||||
clap.help(Output.errorWriter(), params) catch {};
|
||||
Output.errorWriter().writeAll("\n") catch {};
|
||||
diag.report(Output.errorWriter(), err) catch {};
|
||||
return err;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user