mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-03 21:40:28 -05:00
feat: Print folder sizes with cypress cache list command. (#8590)
This commit is contained in:
@@ -102,6 +102,7 @@ const descriptions = {
|
||||
cacheClear: 'delete all cached binaries',
|
||||
cacheList: 'list cached binary versions',
|
||||
cachePath: 'print the path to the binary cache',
|
||||
cacheSize: 'Used with the list command to show the sizes of the cached folders',
|
||||
ciBuildId: 'the unique identifier for a run on your CI provider. typically a "BUILD_ID" env var. this value is automatically detected for most CI providers',
|
||||
config: 'sets configuration values. separate multiple values with a comma. overrides any value in cypress.json.',
|
||||
configFile: 'path to JSON file where configuration values are set. defaults to "cypress.json". pass "false" to disable.',
|
||||
@@ -386,6 +387,7 @@ module.exports = {
|
||||
.option('list', text('cacheList'))
|
||||
.option('path', text('cachePath'))
|
||||
.option('clear', text('cacheClear'))
|
||||
.option('--size', text('cacheSize'))
|
||||
.action(function (opts, args) {
|
||||
if (!args || !args.length) {
|
||||
this.outputHelp()
|
||||
@@ -398,6 +400,12 @@ module.exports = {
|
||||
unknownOption.call(this, `cache ${command}`, 'command')
|
||||
}
|
||||
|
||||
if (command === 'list') {
|
||||
cache.list(opts.size)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
cache[command]()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user