Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

open_file doesn't handle Path("-") #2106

Closed
davidism opened this issue Oct 25, 2021 · 0 comments
Closed

open_file doesn't handle Path("-") #2106

davidism opened this issue Oct 25, 2021 · 0 comments
Assignees
Milestone

Comments

@davidism
Copy link
Member

davidism commented Oct 25, 2021

If click.Path(allow_dash=True, path_type=pathlib.Path) is used, it can return pathlib.Path("-"). Open file only checks filename == "-". If pathlib.Path("-") is passed, it will cause a file named "-" to be opened instead of a standard stream.

@davidism davidism added this to the 8.0.4 milestone Oct 25, 2021
@davidism davidism self-assigned this Oct 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant