Describe the feature or problem you’d like to solve
I use gh cache delete --all to purge all cache related to a workflow that stores ephemeral items in cache.
- When cache items are present and they are successfully removed, the command returns an exit code of 0.
- When no cache items are present, the command returns an exit code of 1.
Unless I parse standard error to read the message for the first case, I can't disambiguate it between an invocation that did not find any cache to remove, and one that did but failed to successfully remove it.
Proposed solution
I propose a unique exit code for the specific case where no cache items were found. This would allow callers to treat this use case as a success and disambiguate it from any genuine errors.
This would simplify its usage for this use case significantly.
Additional context
According to the manual, it appears this would not fall outside of the cli's existing behavior.
Describe the feature or problem you’d like to solve
I use
gh cache delete --allto purge all cache related to a workflow that stores ephemeral items in cache.Unless I parse standard error to read the message for the first case, I can't disambiguate it between an invocation that did not find any cache to remove, and one that did but failed to successfully remove it.
Proposed solution
I propose a unique exit code for the specific case where no cache items were found. This would allow callers to treat this use case as a success and disambiguate it from any genuine errors.
This would simplify its usage for this use case significantly.
Additional context
According to the manual, it appears this would not fall outside of the cli's existing behavior.