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

Conan CLI: Add option to conan remove to just skip without error if package does not exist #16221

Open
vincesp opened this issue May 8, 2024 · 2 comments
Assignees

Comments

@vincesp
Copy link

vincesp commented May 8, 2024

The conan remove command is missing an option to skip without returning an error if the package to be removed does not exist.

Background: It is really cumbersome to build an Azure pipeline that detects if a package exists and only runs the conan remove task if it does. If using a pool with numerous agents, we cannot be sure in which state the conan cache on every single agent is, so we need to clean the cache just to be sure. Adding continueOnError: true to the task only helps partially, as the pipeline run will show "completed with warnings" which does not reflect the actual outcome properly.

@memsharded memsharded self-assigned this May 8, 2024
@memsharded
Copy link
Member

Hi @vincesp

This doesn't look like a docs issue, but a client one. Moving it to the Conan client repo.

@memsharded memsharded transferred this issue from conan-io/docs May 8, 2024
@memsharded
Copy link
Member

memsharded commented May 8, 2024

The conan remove command is missing an option to skip without returning an error if the package to be removed does not exist.

$ conan remove zlib/1.4
Remove summary:
Local Cache

This works without failing, not sure what you mean (zlib/1.4 doesn't exist yet)

Background: It is really cumbersome to build an Azure pipeline that detects if a package exists and only runs the conan remove task if it does. If using a pool with numerous agents, we cannot be sure in which state the conan cache on every single agent is, so we need to clean the cache just to be sure.

It is not clear the background. Why would you remove a package if it exists? The whole purpose of using Conan is not having to rebuild something that already exists, this flow shouldn't be necessary in the first place.

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

No branches or pull requests

2 participants