aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-21 00:58:24 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-21 00:58:24 -0700
commitf3779b8e73c12cab9dd045e24b07ac3b90125c0b (patch)
tree746b70823fb3fc9e88aebf3ca890516d299f1b52 /src
parentca5b996299269c43dd15ca0ba94457301484a6ab (diff)
downloadbun-f3779b8e73c12cab9dd045e24b07ac3b90125c0b.tar.gz
bun-f3779b8e73c12cab9dd045e24b07ac3b90125c0b.tar.zst
bun-f3779b8e73c12cab9dd045e24b07ac3b90125c0b.zip
[breaking] `bun run <missing script>` should return a nonzero exit code
Diffstat (limited to 'src')
-rw-r--r--src/cli.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cli.zig b/src/cli.zig
index 3d1e25abf..f3bcf97a2 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -1094,7 +1094,11 @@ pub const Command = struct {
.RunCommand => {
const ctx = try Command.Context.create(allocator, log, .RunCommand);
if (ctx.positionals.len > 0) {
- _ = try RunCommand.exec(ctx, false, true);
+ if (try RunCommand.exec(ctx, false, true)) {
+ return;
+ }
+
+ Global.exit(1);
}
},
.UpgradeCommand => {