Skip to content

bug: rtk wget interprets -O - flag as URL #716

Closed

Description

@pszymkowiak

Problem

rtk wget https://example.com -O - fails with:

example.com FAILED: Prepended http:// to '-'

RTK treats - (stdout redirect) as a URL and prepends http:// to it.

Expected

Should pass -O - through to wget as a flag, not interpret it as a second URL.

Workaround

rtk wget https://example.com works (without -O -).

Found during

LLM comprehension testing on 57 RTK commands — this was the only command that failed.

Activity

  1. added
    bug
    effort-small
    filter-quality
    good first issue
    on Mar 20, 2026
  2. pszymkowiak commented on Mar 20, 2026

    @pszymkowiak
    CollaboratorAuthor

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟢 Priority low
    🎯 Confidence 93%

    Summary

    rtk wget misidentifies '-O -' flag as a URL and prepends 'http://'; fix is in progress via PR #793.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.


    Triaged automatically by wshm · This is an automated analysis, not a human review.

  3. added 2 commits that reference this issue on Mar 24, 2026
    b777e6e
    7ec2d29
  4. KuSh commented on Sep 5, 2026

    @KuSh
    Collaborator

    This is fixed on develop: rtk wget https://example.com -O - now passes -O - through to wget and prints the body to stdout instead of treating - as a URL. Please reopen or comment if you still hit it on the latest version.

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

    area:clibugeffort-smallfilter-qualitygood first issuepriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions