rtk-ai / rtk-ai/rtk

Cargo `+toolchain` commands are not rewritten or filtered

Open
#3,387 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:cli bug good first issue priority:medium
Dominant language
Rust
Stars
81.1k
Forks
5.1k
Avg merge
4d 11h
Merged PRs (30d)
40

Description

Bug

Cargo commands using rustup's +toolchain syntax are not recognized by the current rewrite path. Support for these commands was previously added in #99, including cargo +nightly test, but the behavior is not present in RTK 0.44.2.

Steps to reproduce

Tested with RTK 0.44.2 on macOS:

$ rtk rewrite "cargo +stable check"
$ echo $?
1

$ rtk hook check "cargo +stable check"
No rewrite for: cargo +stable check

In a crate containing a compilation error, compare:

rtk cargo check
rtk cargo +stable check

Actual behavior

rtk cargo check applies the Cargo filter and produces compact output:

cargo check: 1 errors, 0 warnings (1 crates)

rtk cargo +stable check executes the command but produces unfiltered Cargo output.

Expected behavior

rtk rewrite should recognize Cargo commands with a +toolchain selector, preserve the selector, and route the Cargo subcommand through the same output filter used without a selector.

This affects filtered subcommands such as build, check, clippy, and test.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with rtk rewrite "cargo +stable check" and rtk hook check "cargo +stable check", then trace the Cargo command rewrite path. Verify that selectors such as +stable and +nightly are preserved and that filtered subcommands including build, check, clippy, and test produce the same compact output as commands without a selector.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.