[uiBundles/resetBundleDir] force del() if bundleDir is outside cwd#22981
Merged
spalger merged 1 commit intoelastic:masterfrom Sep 13, 2018
Merged
[uiBundles/resetBundleDir] force del() if bundleDir is outside cwd#22981spalger merged 1 commit intoelastic:masterfrom
spalger merged 1 commit intoelastic:masterfrom
Conversation
Contributor
💚 Build Succeeded |
Contributor
|
Do you know if we can make the pattern more specific? I know this is a start time config but I'd feel better if we made it more specific to add some protection against an incorrect path. maybe bundles/*? or *.{js,css}? |
Contributor
Author
|
Well the bundle includes images, fonts, etc, but that directory is created by the optimizer so I don't think there's any risk in emptying it completely |
jbudz
approved these changes
Sep 13, 2018
spalger
pushed a commit
to spalger/kibana
that referenced
this pull request
Sep 13, 2018
…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
pushed a commit
to spalger/kibana
that referenced
this pull request
Sep 13, 2018
…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".
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
UiBundlesController.resetBundleDir()method deletes old bundle assets when necessary usingdel(), which by default limits deletes to directories withinprocess.cwd. This is normally very helpful, but in our case we don't want to limit theoptimize.bundleDirto the current working directory, so we must use theforce: trueconfig 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.bundleDirconfiguration or the Kibana installation will no longer fail with "Cannot delete files/folders outside the current working directory".