rtk-ai/rtk

gradle.toml matcher does not match real `rtk ./gradlew` / `rtk gradle` invocations

Open

#1177 aperta il 10 apr 2026

Vedi su GitHub
 (1 commento) (1 reazione) (0 assegnatari)Rust (2914 fork)batch import
area:configbugeffort-smallfilter-qualitygood first issuepriority:medium

Metriche repository

Star
 (48.085 star)
Metriche merge PR
 (Merge medio 11g 1h) (45 PR mergiate in 30 g)

Descrizione

src/filters/gradle.toml currently has a match_command that does not match the command string RTK actually looks up at runtime, so Gradle output falls back to passthrough.

MWE

# in any Gradle project with ./gradlew present
RTK_TOML_DEBUG=1 rtk ./gradlew tasks

# actual:
# [rtk:toml] looking up filter for: "gradlew tasks" (58 filters loaded)
# [rtk:toml] no filter matched — passthrough

Expected

[rtk:toml] matched filter: 'gradle'

Debug

RTK_TOML_DEBUG=1 rtk ./gradlew tasks
RTK_TOML_DEBUG=1 rtk gradle tasks # if a gradle executable is on the path

Local workaround Use a user/project filter override with:

match_command = "^(?:\\./)?gradlew?\\b"

Proposed fix in rtk

  • Update src/filters/gradle.toml matcher to match the normalized lookup string.
  • Add inline tests for gradlew ... and ./gradlew ....
  • Add an integration test covering actual fallback lookup behavior.

Context

  • Similar fix was already proposed in PR #966, but it was closed unmerged.
  • Related: #1178.

Guida contributor