mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[config] throw if config file has a syntax error (elastic/kibana-plugin-helpers#65)
Original commit: elastic/kibana-plugin-helpers@487dd70bdb
This commit is contained in:
parent
e734ee8338
commit
608c9ff38b
1 changed files with 5 additions and 2 deletions
|
@ -19,13 +19,16 @@ module.exports = function (root) {
|
|||
const content = JSON.parse(readFileSync(resolve(root, configFile)));
|
||||
config = Object.assign(config, content);
|
||||
} catch (e) {
|
||||
// noop
|
||||
// rethrow error unless it's complaining about file not existing
|
||||
if (e.code !== 'ENOENT') {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const deprecationMsg = 'has been removed from `@elastic/plugin-helpers`. ' +
|
||||
'During development your plugin must be located in `../kibana-extra/{pluginName}` ' +
|
||||
'relative to the Kibana directory to work with this package.\n'
|
||||
'relative to the Kibana directory to work with this package.\n';
|
||||
|
||||
if (config.kibanaRoot) {
|
||||
throw new Error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue