Skip to content

πŸ› fix(config): keep rewritten paths as operands - #4317

Merged
gaborbernat merged 5 commits into
tox-dev:mainfrom
rahuldevikar:radevika-microsoft-fix-args-are-paths-project-file-option
Oct 30, 2026
Merged

gaborbernat merged 5 commits into
tox-dev:mainfrom
rahuldevikar:radevika-microsoft-fix-args-are-paths-project-file-option

Conversation

@rahuldevikar

@rahuldevikar rahuldevikar commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

With args_are_paths enabled, a forwarded file path can become a command option when tox rewrites it relative to change_dir and the new name starts with - (#4218). tox now prefixes that rewritten name with the platform's current-directory marker when the original argument did not start with -, so the command receives a path.

Positional argument conversion makes this adjustment before INI or TOML commands receive the arguments.

Fixes #4218.

@rahuldevikar
rahuldevikar force-pushed the radevika-microsoft-fix-args-are-paths-project-file-option branch from 179477d to e29a93a Compare October 30, 2026 16:22
@rahuldevikar rahuldevikar changed the title πŸ› fix(config): keep args_are_paths rewrites from becoming options fix(config): keep args_are_paths rewrites from becoming options Oct 30, 2026
@rahuldevikar
rahuldevikar force-pushed the radevika-microsoft-fix-args-are-paths-project-file-option branch from e29a93a to 6e8651f Compare October 30, 2026 16:28
@gaborbernat gaborbernat added the bug A confirmed defect label Oct 30, 2026
@gaborbernat gaborbernat changed the title fix(config): keep args_are_paths rewrites from becoming options πŸ› fix(config): keep rewritten paths as operands Oct 30, 2026
@rahuldevikar
rahuldevikar force-pushed the radevika-microsoft-fix-args-are-paths-project-file-option branch from e8035ff to 8b229a9 Compare October 30, 2026 17:49
rahuldevikar and others added 3 commits October 30, 2026 10:50
A positional argument naming an existing file was rewritten relative to change_dir, and the result could start with '-', turning a path into a command option. Prefix such rewrites with './'.
Keep pos_args within the complexity limit after rebasing onto main.
@rahuldevikar
rahuldevikar force-pushed the radevika-microsoft-fix-args-are-paths-project-file-option branch from 8b229a9 to d18a6b6 Compare October 30, 2026 17:52
@gaborbernat
gaborbernat merged commit 41705a1 into tox-dev:main Oct 30, 2026
27 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A confirmed defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

args_are_paths turns a project file name into a command option

2 participants