aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-07-05 00:56:39 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-07-05 00:56:39 -0700
commit2d8dfeff49a543054e9390c505337386aaf1cd9b (patch)
tree9d7a474576aa7a36f72e7eb2578621db122b03c0
parent18290dee8b7e338e5ee1a33348fdf27275b91ec5 (diff)
downloadbun-2d8dfeff49a543054e9390c505337386aaf1cd9b.tar.gz
bun-2d8dfeff49a543054e9390c505337386aaf1cd9b.tar.zst
bun-2d8dfeff49a543054e9390c505337386aaf1cd9b.zip
[breaking] `bun` now prints the help menu instead of the dev server
-rw-r--r--src/cli.zig10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/cli.zig b/src/cli.zig
index 971aafa84..e9798eba8 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -396,7 +396,7 @@ pub const Arguments = struct {
if (args.option("--port")) |port_str| {
opts.port = std.fmt.parseInt(u16, port_str, 10) catch return error.InvalidPort;
}
- opts.serve = cmd == .DevCommand or (FeatureFlags.dev_only and cmd == .AutoCommand);
+ opts.serve = cmd == .DevCommand;
opts.main_fields = args.options("--main-fields");
opts.generate_node_module_bundle = cmd == .BunCommand;
opts.inject = args.options("--inject");
@@ -841,7 +841,7 @@ pub const Command = struct {
const skipped = args_iter.skip();
if (!skipped) {
- return .AutoCommand;
+ return .HelpCommand;
}
var next_arg = ((args_iter.next()) orelse return .AutoCommand);
@@ -1229,11 +1229,7 @@ pub const Command = struct {
Global.exit(1);
}
- if (FeatureFlags.dev_only) {
- try DevCommand.exec(ctx);
- } else {
- try BuildCommand.exec(ctx);
- }
+ try HelpCommand.exec(allocator);
},
else => unreachable,
}