Skip to content

Disable Click's Windows tilde expansion to fix -c ~= argument parsing#237

Merged
damnever merged 2 commits intomainfrom
copilot/fix-issue-236
Feb 12, 2026
Merged

Disable Click's Windows tilde expansion to fix -c ~= argument parsing#237
damnever merged 2 commits intomainfrom
copilot/fix-issue-236

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

On Windows, Click automatically expands ~ in CLI arguments to the user's home directory before option parsing. This causes -c "~=" (compatible-release specifier) to become -c "C:\Users\=", which fails validation.

  • Pass windows_expand_args=False to cli.main() to disable this behavior
# Before
def main():
    cli()

# After
def main():
    cli.main(windows_expand_args=False)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

… on Windows (#236)

Co-authored-by: damnever <6223594+damnever@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue 236 with pigar Disable Click's Windows tilde expansion to fix -c ~= argument parsing Feb 8, 2026
Copilot AI requested a review from damnever February 8, 2026 12:41
@damnever damnever linked an issue Feb 8, 2026 that may be closed by this pull request
@damnever damnever marked this pull request as ready for review February 12, 2026 09:04
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 12, 2026
@damnever damnever merged commit d12fdd4 into main Feb 12, 2026
6 checks passed
@damnever damnever deleted the copilot/fix-issue-236 branch February 12, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug lgtm This PR has been approved by a maintainer size/XS Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-c ~= becomes C:\Users\= on Windows

2 participants