Skip to content
Closed
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
18 changes: 16 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1871,8 +1871,22 @@ fn run_cli() -> Result<i32> {
"prettier" => prettier_cmd::run(&args[1..], cli.verbose)?,
"playwright" => playwright_cmd::run(&args[1..], cli.verbose)?,
_ => {
// Generic passthrough with npm boilerplate filter
npm_cmd::run(&args, cli.verbose, cli.skip_env)?
// Passthrough via npx (not npm) — unknown tools need npx directly.
let timer = core::tracking::TimedExecution::start();
let mut cmd = core::utils::resolved_command("npx");
cmd.args(&args);
if cli.skip_env {
cmd.env("SKIP_ENV_VALIDATION", "1");
}
let cmd_label = format!("npx {}", args.join(" "));
let status = cmd.status().with_context(|| {
format!("Failed to run `{cmd_label}`. Is npx on PATH?")
})?;
timer.track_passthrough(
&cmd_label,
&format!("rtk {cmd_label} (passthrough)"),
);
core::utils::exit_code_from_status(&status, &cmd_label)
}
}
}
Expand Down