Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
}
Expand Down