Skip to content

fix(pipx): combine --pip-args value to avoid argparse error#9982

Closed
fru1tworld wants to merge 1 commit into
jdx:mainfrom
fru1tworld:fix/9976-pipx-pip-args
Closed

fix(pipx): combine --pip-args value to avoid argparse error#9982
fru1tworld wants to merge 1 commit into
jdx:mainfrom
fru1tworld:fix/9976-pipx-pip-args

Conversation

@fru1tworld

Copy link
Copy Markdown
Contributor

Summary

pipx's argparse rejected --pip-args --uploaded-prior-to=... because the value starts with --. Pack into a single --pip-args=VALUE element. Regression from #9190.

Closes #9976

@greptile-apps

greptile-apps Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixes a regression (#9190) where --pip-args --uploaded-prior-to=... was passed as two separate argv elements, causing pipx's argparse to misinterpret the value as a new flag because it starts with --. The fix collapses them into a single --pip-args=VALUE form.

  • The pip_uploaded_prior_to_args helper now returns a single --pip-args=--uploaded-prior-to={date} element instead of two separate elements.
  • The corresponding unit test was updated to reflect the new expected output, with a comment explaining the rationale.

Confidence Score: 5/5

Minimal, targeted fix with a matching test update — safe to merge.

The change is a single-function, single-file edit that corrects an argparse parsing failure. The logic is straightforward, the test is updated to match, and no other callers are affected.

No files require special attention.

Important Files Changed

Filename Overview
src/backend/pipx.rs Combines --pip-args and its value into a single --pip-args=VALUE argv element so pipx's argparse doesn't misinterpret the leading -- as a new flag; unit test updated accordingly.

Reviews (1): Last reviewed commit: "fix(pipx): combine --pip-args value to a..." | Re-trigger Greptile

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the PIPXBackend to combine the --pip-args flag and its value into a single argument string. This change ensures that pipx correctly parses the value without misinterpreting its leading dashes as separate flags. The corresponding test case has been updated to reflect this change and includes a comment explaining the rationale. I have no feedback to provide as there were no review comments.

@github-actions

Copy link
Copy Markdown

This PR has had failing checks for more than 7 days. Feel free to reopen or create a new PR if you'd like to continue working on this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants