Be able to delete watch_optimizer_cache_state.json when data folder is outside of Kibana source folder (#32446) (#34959)

This commit is contained in:
Tiago Costa 2019-04-12 02:09:46 +01:00 committed by GitHub
parent 316fe42ec5
commit 0e88c26efa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,7 @@ export class WatchCache {
// start by deleting the state file to lower the
// amount of time that another process might be able to
// successfully read it once we decide to delete it
await del(this.statePath);
await del(this.statePath, { force: true });
// delete everything in optimize/.cache directory
await del(await globby([normalizePosixPath(this.cachePath)], { dot: true }));