Skip to content

[6.x] [uiBundles/resetBundleDir] force del() if bundleDir is outside cwd (#22981)#23002

Merged
spalger merged 1 commit intoelastic:6.xfrom
spalger:backport/6.x/pr-22981
Sep 13, 2018
Merged

[6.x] [uiBundles/resetBundleDir] force del() if bundleDir is outside cwd (#22981)#23002
spalger merged 1 commit intoelastic:6.xfrom
spalger:backport/6.x/pr-22981

Conversation

@spalger
Copy link
Copy Markdown
Contributor

@spalger spalger commented Sep 13, 2018

Backports the following commits to 6.x:

…lastic#22981)

The `UiBundlesController.resetBundleDir()` method deletes old bundle assets when necessary using `del()`, which by default limits deletes to directories within `process.cwd`. This is normally very helpful, but in our case we don't want to limit the `optimize.bundleDir` to the current working directory, so we must use the `force: true` config to disable this check.

release notes: Trying to run a Kibana optimization (usually after installing or disabling a plugin) from a directory that is not a parent of the `optimize.bundleDir` configuration or the Kibana installation will no longer fail with "Cannot delete files/folders outside the current working directory".
@spalger spalger added the backport This PR is a backport of another PR label Sep 13, 2018
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@spalger spalger merged commit a7abb84 into elastic:6.x Sep 13, 2018
@spalger spalger deleted the backport/6.x/pr-22981 branch September 13, 2018 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants