diff options
author | 2023-01-28 01:09:42 -0800 | |
---|---|---|
committer | 2023-01-28 01:09:42 -0800 | |
commit | 128a2939010837058ef3bd375eb1f2e024d43577 (patch) | |
tree | 4b6ff42e7b315d64eab9e43819917fe58e58b330 /src | |
parent | 6557df29122c328745b169ed7fe57f4333b40bc8 (diff) | |
download | bun-128a2939010837058ef3bd375eb1f2e024d43577.tar.gz bun-128a2939010837058ef3bd375eb1f2e024d43577.tar.zst bun-128a2939010837058ef3bd375eb1f2e024d43577.zip |
Make the parser error in bun install look better
Diffstat (limited to 'src')
-rw-r--r-- | src/install/install.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/install/install.zig b/src/install/install.zig index 2885b5a26..4ae9574ac 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -5550,6 +5550,11 @@ pub const PackageManager = struct { ctx.log.printForLogLevelWithEnableAnsiColors(Output.errorWriter(), false) catch {}; } + if (err == error.ParserError and ctx.log.errors > 0) { + Output.prettyErrorln("error: Failed to parse package.json", .{}); + Global.crash(); + } + Output.panic("<r><red>{s}<r> parsing package.json<r>", .{ @errorName(err), }); |