Skip to content

[release/2.4] ctr: preserve args after "-" in images export - #14219

Merged
samuelkarp merged 1 commit into
containerd:release/2.4from
k8s-infra-cherrypick-robot:cherry-pick-14217-to-release/2.4
Sep 24, 2026
Merged

samuelkarp merged 1 commit into
containerd:release/2.4from
k8s-infra-cherrypick-robot:cherry-pick-14217-to-release/2.4

Conversation

@k8s-infra-cherrypick-robot

@k8s-infra-cherrypick-robot k8s-infra-cherrypick-robot commented Sep 24, 2026 •

Copy link
Copy Markdown

This is an automated cherry-pick of #14217

/assign thaJeztah

Fix bug where arguments following "-" were dropped in "ctr images export"

urfave/cli/v3 breaks out of its flag parsing loop when it encounters a
"-" positional argument without appending the remaining arguments,
causing "ctr images export - <image>" to drop all image references and
flags following "-".

When <out> is "-", recover the un-truncated arguments from the parent
"images" command lineage and re-parse the tail starting at "-" with a
sentinel placeholder so trailing image references and flags are
preserved.

This workaround can be removed after the bug is fixed upstream:

* urfave/cli#2418
* urfave/cli#2419

Assisted-by: Antigravity
Signed-off-by: Samuel Karp <[email protected]>

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (assuming CI is happy)

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Sep 24, 2026
@samuelkarp
samuelkarp merged commit a7ddb10 into containerd:release/2.4 Sep 24, 2026
55 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Sep 24, 2026
@samuelkarp samuelkarp added impact/changelog area/ctr ctr development tool labels Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants