mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
parent
ac69b5bc16
commit
34bfb33a65
4 changed files with 20 additions and 3 deletions
|
@ -4,6 +4,7 @@ import Logger from '../lib/logger';
|
|||
import { getConfig } from '../../server/path';
|
||||
import { parse, parseMilliseconds } from './settings';
|
||||
import logWarnings from '../lib/log_warnings';
|
||||
import { warnIfUsingPluginDirOption } from '../lib/warn_if_plugin_dir_option';
|
||||
|
||||
function processCommand(command, options) {
|
||||
let settings;
|
||||
|
@ -16,6 +17,8 @@ function processCommand(command, options) {
|
|||
}
|
||||
|
||||
const logger = new Logger(settings);
|
||||
|
||||
warnIfUsingPluginDirOption(options, fromRoot('plugins'), logger);
|
||||
logWarnings(settings, logger);
|
||||
install(settings, logger);
|
||||
}
|
||||
|
@ -37,7 +40,7 @@ export default function pluginInstall(program) {
|
|||
)
|
||||
.option(
|
||||
'-d, --plugin-dir <path>',
|
||||
'path to the directory where plugins are stored',
|
||||
'path to the directory where plugins are stored (DEPRECATED, known to not work for all plugins)',
|
||||
fromRoot('plugins')
|
||||
)
|
||||
.description('install a plugin',
|
||||
|
|
8
src/cli_plugin/lib/warn_if_plugin_dir_option.js
Normal file
8
src/cli_plugin/lib/warn_if_plugin_dir_option.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
export function warnIfUsingPluginDirOption(options, defaultValue, logger) {
|
||||
if (options.pluginDir !== defaultValue) {
|
||||
logger.log(
|
||||
'Warning: Using the -d, --plugin-dir option is deprecated, and is ' +
|
||||
'known to not work for all plugins, including X-Pack.'
|
||||
);
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ import list from './list';
|
|||
import Logger from '../lib/logger';
|
||||
import { parse } from './settings';
|
||||
import logWarnings from '../lib/log_warnings';
|
||||
import { warnIfUsingPluginDirOption } from '../lib/warn_if_plugin_dir_option';
|
||||
|
||||
function processCommand(command, options) {
|
||||
let settings;
|
||||
|
@ -15,6 +16,8 @@ function processCommand(command, options) {
|
|||
}
|
||||
|
||||
const logger = new Logger(settings);
|
||||
|
||||
warnIfUsingPluginDirOption(options, fromRoot('plugins'), logger);
|
||||
logWarnings(settings, logger);
|
||||
list(settings, logger);
|
||||
}
|
||||
|
@ -24,7 +27,7 @@ export default function pluginList(program) {
|
|||
.command('list')
|
||||
.option(
|
||||
'-d, --plugin-dir <path>',
|
||||
'path to the directory where plugins are stored',
|
||||
'path to the directory where plugins are stored (DEPRECATED, known to not work for all plugins)',
|
||||
fromRoot('plugins')
|
||||
)
|
||||
.description('list installed plugins')
|
||||
|
|
|
@ -4,6 +4,7 @@ import Logger from '../lib/logger';
|
|||
import { parse } from './settings';
|
||||
import { getConfig } from '../../server/path';
|
||||
import logWarnings from '../lib/log_warnings';
|
||||
import { warnIfUsingPluginDirOption } from '../lib/warn_if_plugin_dir_option';
|
||||
|
||||
function processCommand(command, options) {
|
||||
let settings;
|
||||
|
@ -16,6 +17,8 @@ function processCommand(command, options) {
|
|||
}
|
||||
|
||||
const logger = new Logger(settings);
|
||||
|
||||
warnIfUsingPluginDirOption(options, fromRoot('plugins'), logger);
|
||||
logWarnings(settings, logger);
|
||||
remove(settings, logger);
|
||||
}
|
||||
|
@ -32,7 +35,7 @@ export default function pluginRemove(program) {
|
|||
)
|
||||
.option(
|
||||
'-d, --plugin-dir <path>',
|
||||
'path to the directory where plugins are stored',
|
||||
'path to the directory where plugins are stored (DEPRECATED, known to not work for all plugins)',
|
||||
fromRoot('plugins')
|
||||
)
|
||||
.description('remove a plugin',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue