diff options
author | 2023-02-15 04:04:06 +0200 | |
---|---|---|
committer | 2023-02-14 18:04:06 -0800 | |
commit | 7597e4ad2a813f53a8924d3820b339d487469bdd (patch) | |
tree | 7fb15d075dc7eb99a559b8a389aba8c84233c9b6 /src/report.zig | |
parent | a80981c9662bc439871ca2197a908632c82491d9 (diff) | |
download | bun-7597e4ad2a813f53a8924d3820b339d487469bdd.tar.gz bun-7597e4ad2a813f53a8924d3820b339d487469bdd.tar.zst bun-7597e4ad2a813f53a8924d3820b339d487469bdd.zip |
[install] improve `package.json` validation (#2074)
- report error and exit gracefully instead of crashing
Diffstat (limited to '')
-rw-r--r-- | src/report.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/report.zig b/src/report.zig index c8c1304b6..62b807f0e 100644 --- a/src/report.zig +++ b/src/report.zig @@ -336,7 +336,7 @@ pub noinline fn globalError(err: anyerror) noreturn { ); Global.exit(1); }, - error.InvalidArgument, error.InstallFailed => { + error.InvalidArgument, error.InstallFailed, error.InvalidPackageJSON => { Global.exit(1); }, error.SystemFdQuotaExceeded => { @@ -349,7 +349,7 @@ pub noinline fn globalError(err: anyerror) noreturn { \\<d>Current limit: {d}<r> \\ \\To fix this, try running: - \\ + \\ \\ <cyan>sudo launchctl limit maxfiles 2147483646<r> \\ <cyan>ulimit -n 2147483646<r> \\ @@ -368,7 +368,7 @@ pub noinline fn globalError(err: anyerror) noreturn { \\<d>Current limit: {d}<r> \\ \\To fix this, try running: - \\ + \\ \\ <cyan>sudo echo -e "\nfs.file-max=2147483646\n" >> /etc/sysctl.conf<r> \\ <cyan>sudo sysctl -p<r> \\ <cyan>ulimit -n 2147483646<r> @@ -410,7 +410,7 @@ pub noinline fn globalError(err: anyerror) noreturn { \\<d>Current limit: {d}<r> \\ \\To fix this, try running: - \\ + \\ \\ <cyan>ulimit -n 2147483646<r> \\ \\You may also need to run: @@ -430,7 +430,7 @@ pub noinline fn globalError(err: anyerror) noreturn { \\<d>Current limit: {d}<r> \\ \\To fix this, try running: - \\ + \\ \\ <cyan>ulimit -n 2147483646<r> \\ \\That will only work for the current shell. To fix this for the entire system, run: @@ -474,7 +474,7 @@ pub noinline fn globalError(err: anyerror) noreturn { \\<d>Current limit: {d}<r> \\ \\To fix this, try running: - \\ + \\ \\ <cyan>ulimit -n 2147483646<r> \\ , |