diff options
Diffstat (limited to '')
-rw-r--r-- | src/cli.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cli.zig b/src/cli.zig index 013b45f31..23082e2ae 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -327,6 +327,10 @@ pub const Arguments = struct { var args = clap.parse(clap.Help, params_to_use, .{ .diagnostic = &diag, .allocator = allocator, + .stop_after_positional_at = if (cmd == .RunCommand) 2 else if (cmd == .AutoCommand) + 1 + else + 0, }) catch |err| { // Report useful error and exit clap.help(Output.errorWriter(), params_to_use) catch {}; @@ -399,6 +403,7 @@ pub const Arguments = struct { opts.generate_node_module_bundle = cmd == .BunCommand; opts.inject = args.options("--inject"); opts.extension_order = args.options("--extension-order"); + ctx.passthrough = args.remaining(); opts.no_summary = args.flag("--no-summary"); opts.disable_hmr = args.flag("--disable-hmr"); @@ -789,6 +794,7 @@ pub const Command = struct { log: *logger.Log, allocator: std.mem.Allocator, positionals: []const string = &[_]string{}, + passthrough: []const string = &[_]string{}, install: ?*Api.BunInstall = null, debug: DebugOptions = DebugOptions{}, |