Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

poetry cache clear --all Not enough arguments (missing: "cache") #9366

Open
brussee opened this issue May 1, 2024 · 4 comments
Open

poetry cache clear --all Not enough arguments (missing: "cache") #9366

brussee opened this issue May 1, 2024 · 4 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@brussee
Copy link

brussee commented May 1, 2024

Description

$ poetry cache clear --all       

Not enough arguments (missing: "cache")

Workarounds

$ poetry cache clear _default_cache

Add the --all option if you want to clear all _default_cache caches

Poetry Installation Method

pip

Operating System

Debian 12

Poetry Version

1.8.2

Poetry Configuration

cache-dir = "/home/paul/.cache/pypoetry"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/paul/.cache/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = true

Python Sysconfig

No response

Example pyproject.toml

No response

Poetry Runtime Logs

$ poetry -vvv cache clear --all

Not enough arguments (missing: "cache")
@brussee brussee added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 1, 2024
@brussee
Copy link
Author

brussee commented May 1, 2024

Just found a working workaround: poetry cache clear --all ""

@dimbleby
Copy link
Contributor

dimbleby commented May 1, 2024

this seems consistent with both the help text and the documentation

what is it that you are reporting?

@brussee
Copy link
Author

brussee commented May 2, 2024

Thanks for your quick reply!

I expect the command poetry cache clear --all to clear all caches. Not just all entries in a specific cache.
But the documentation is consistent with this behavior, so technically you are correct (the best kind of correct, as one might say).

However, I expect the workaround poetry cache clear --all "" to return an error, because there is no cache named "". So if the command above is considered a feature and not a bug, then this workaround shows erroneous behavior in my view.

Do you agree? If so, would you like me to edit this issue or close this one and create a new one?

@dimbleby
Copy link
Contributor

dimbleby commented May 2, 2024

please arrange that whatever issue you leave open - whether this one or a new one - is clear about what you did, what you expected to happen, what actually happened - and that this is indeed different from what the help text and docs say should happen

presumably straightforward to check for an empty string here: submit a merge request if this is important to you. Doing it yourself is always by far the most likely way to make something actually happen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants