mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Backports the following commits to 6.x: - [uiBundles/resetBundleDir] force del() if bundleDir is outside cwd (#22981)
This commit is contained in:
parent
067e162aa8
commit
a7abb848fd
1 changed files with 6 additions and 1 deletions
|
@ -152,7 +152,12 @@ export class UiBundlesController {
|
|||
await mkdirpAsync(this._workingDir);
|
||||
} else {
|
||||
// delete all children of the working directory
|
||||
await del(this.resolvePath('*'));
|
||||
await del(this.resolvePath('*'), {
|
||||
// since we know that `this.resolvePath()` is going to return an absolute path based on the `optimize.bundleDir`
|
||||
// and since we don't want to require that users specify a bundleDir that is within the cwd or limit the cwd
|
||||
// directory used to run Kibana in any way we use force here
|
||||
force: true
|
||||
});
|
||||
}
|
||||
|
||||
// write the entry/style files for each bundle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue