Files
cypress/cli/lib/tasks/cache.js
Ben Kucera 56e00981aa cache commands, --no-exit (#1875)
* add --no-exit, cache commands

* Manage -> Manages

* fix run, run spec

* remove comments
2018-06-05 16:19:23 -04:00

29 lines
486 B
JavaScript

const state = require('./state')
const logger = require('../logger')
const fs = require('../fs')
const util = require('../util')
const path = () => {
logger.log(state.getCacheDir())
return undefined
}
const clear = () => {
return fs.removeAsync(state.getCacheDir())
}
const list = () => {
return fs
.readdirAsync(state.getCacheDir())
.filter(util.isSemver)
.then((versions) => {
logger.log(versions.join(', '))
})
}
module.exports = {
path,
clear,
list,
}