Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
[config] throw if config file has a syntax error (elastic#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Feb 5, 2018
1 parent 37fa96f commit c235894
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/kbn-plugin-helpers/lib/config_file.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c235894

Please sign in to comment.