mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
allow customizing the directory plugins are installed to, move default out of src
This commit is contained in:
parent
a3e93ee4a3
commit
d21490c639
4 changed files with 8 additions and 8 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -12,4 +12,4 @@ target
|
|||
*.log
|
||||
esvm
|
||||
.htpasswd
|
||||
src/server/bin/plugins
|
||||
installed_plugins
|
||||
|
|
|
@ -40,7 +40,7 @@ module.exports = function (program) {
|
|||
.option(
|
||||
'-d, --plugin-dir <path>',
|
||||
'The path to the directory where plugins are stored',
|
||||
fromRoot('plugins')
|
||||
fromRoot('installed_plugins')
|
||||
)
|
||||
.description(
|
||||
'Maintain Plugins',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var path = require('path');
|
||||
var resolve = require('path').resolve;
|
||||
var expiry = require('expiry-js');
|
||||
|
||||
module.exports = function (options) {
|
||||
|
@ -38,8 +38,6 @@ module.exports = function (options) {
|
|||
urls: []
|
||||
};
|
||||
|
||||
settings.workingPath = path.resolve(__dirname, '..', 'plugins', '.plugin.installing');
|
||||
|
||||
if (options.timeout) {
|
||||
settings.timeout = options.timeout;
|
||||
}
|
||||
|
@ -94,8 +92,10 @@ module.exports = function (options) {
|
|||
throw new Error('Please specify either --install or --remove.');
|
||||
}
|
||||
|
||||
settings.pluginDir = options.pluginDir;
|
||||
if (settings.package) {
|
||||
settings.pluginPath = path.resolve(__dirname, '..', 'plugins', settings.package);
|
||||
settings.pluginPath = resolve(settings.pluginDir, settings.package);
|
||||
settings.workingPath = resolve(settings.pluginDir, '.plugin.installing');
|
||||
}
|
||||
|
||||
return settings;
|
||||
|
@ -105,4 +105,4 @@ module.exports = function (options) {
|
|||
parse: parse,
|
||||
parseMilliseconds: parseMilliseconds
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ module.exports = function (program) {
|
|||
'times to specify multiple directories',
|
||||
pluginDirCollector,
|
||||
[
|
||||
fromRoot('plugins'),
|
||||
fromRoot('installed_plugins'),
|
||||
fromRoot('src/plugins')
|
||||
]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue