Skip to content

Bug: RTK_DISABLED=1 is ignored by rtk rewrite #345

Closed

Description

@pszymkowiak

Description

RTK_DISABLED=1 curl ... is still rewritten to RTK_DISABLED=1 rtk curl ... by rtk rewrite. The env var prefix is preserved but never checked — RTK_DISABLED doesn't exist anywhere in the Rust codebase.

Reproduction

rtk rewrite "RTK_DISABLED=1 curl https://example.com"
# Output: RTK_DISABLED=1 rtk curl https://example.com
# Expected: no rewrite (exit 1)

Expected behavior

When a command is prefixed with RTK_DISABLED=1, rtk rewrite should exit 1 (no rewrite).

Fix

Check for RTK_DISABLED=1 prefix in rewrite_command() and skip rewrite.

Activity

  1. added
    bugSomething isn't working
    P1-criticalBloque des utilisateurs, fix ASAP
    on Mar 5, 2026
  2. added a commit that references this issue on Mar 5, 2026
  3. pszymkowiak commented on Mar 5, 2026

    @pszymkowiak
    CollaboratorAuthor

    Fixed in v0.27.0 — rewrite_segment now skips when RTK_DISABLED= is in env prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-criticalBloque des utilisateurs, fix ASAPbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions