diff --git a/src/main.rs b/src/main.rs index 0ff5124c..9a62317a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2006,8 +2006,25 @@ fn main() -> Result<()> { playwright_cmd::run(&args[1..], cli.verbose)?; } _ => { - // Generic passthrough with npm boilerplate filter - npm_cmd::run(&args, cli.verbose, cli.skip_env)?; + // Passthrough to npx (not npm) — unrecognized tools get + // raw output since we can't predict their format. + let timer = tracking::TimedExecution::start(); + let mut cmd = utils::resolved_command("npx"); + cmd.args(&args); + if cli.skip_env { + cmd.env("SKIP_ENV_VALIDATION", "1"); + } + let args_str = args.join(" "); + let status = cmd.status().with_context(|| { + format!("Failed to run `npx {args_str}`. Is npx on PATH?") + })?; + timer.track_passthrough( + &format!("npx {}", args_str), + &format!("rtk npx {} (passthrough)", args_str), + ); + if !status.success() { + std::process::exit(status.code().unwrap_or(1)); + } } } }