rtk-ai/rtk

`gh run view --job <id>` rejected with "Run ID required"

Open

#1568 aperta il 28 apr 2026

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Rust (2914 fork)batch import
area:clibugeffort-smallfilter-qualitygood first issueplatform:windowspriority:low

Metriche repository

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

Descrizione

gh run view accepts --job <id> as an alternative to a positional run ID, but rtk rejects this form with rtk: Run ID required.

Reproduction:

$ gh run view --job 72893237475 --repo owner/repo --log
rtk: Run ID required

The same command works with RTK_DISABLED=1.

Per the gh CLI, the signature is gh run view [<run-id>] [flags] and --job is documented as a way to view a specific job — the positional run ID becomes optional in that case.

view_run requires a positional identifier and errors when none is found, even though --job and its value are correctly consumed into extra_args:

https://github.com/rtk-ai/rtk/blob/e1f2845df06a8d8b8325945dc4940ec5f530e4cc/src/cmds/git/gh_cmd.rs#L745-L749

--job is already listed in flags_with_value so its value is not mistaken for the run ID, but the --job-only invocation path was not handled:

https://github.com/rtk-ai/rtk/blob/e1f2845df06a8d8b8325945dc4940ec5f530e4cc/src/cmds/git/gh_cmd.rs#L124-L133

Environment: rtk 0.37.2, Windows 11, Git Bash.

Related: #416 / #477 fixed the case where --job's value was being eaten as the run ID, but did not cover the case where --job is the sole identifier.

Guida contributor