-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-cacherelating to the gh cache commandrelating to the gh cache commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
When using gh cache delete with a cache-key that has multiple matches like so:
When i run the gh cache delete test-cache-this-is-always-the-same it outputs that one cache was successfully deleted. Even though that all three of these was deleted.
Affected version
gh version 2.78.0 (2025-08-21)
https://github.com/cli/cli/releases/tag/v2.78.0
Steps to reproduce the behavior
- Create a new repository that includes an action that uses
@actions/cachewith the same key across multiple branches. (I have created a testing repository, which can be used as a starting point https://github.com/luxass/gh-cache-test) - Verify with
gh cache list - Run
gh cache deletewhich prints that one cache was successfully deleted.
Expected vs actual behavior
I would expect that it prints the correct number of caches that was deleted.
Additional Context
The REST Api supports returning the list of deleted caches when using a cache-key.
So there should probably be some conditional output, since the delete by cache-id returns a 204 status code.
Logs
Paste the activity from your command line. Redact if needed.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-cacherelating to the gh cache commandrelating to the gh cache commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic