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

Commit

Permalink
[config] throw if config file has a syntax error (#65)
Browse files Browse the repository at this point in the history
(cherry picked from commit 487dd70)
  • Loading branch information
spalger committed Feb 5, 2018
1 parent 2dd8996 commit 08f1a59
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/config_file.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ 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 deprecated and is removed in the next ' +
'major version of `@elastic/plugin-helpers`.\n'
'major version of `@elastic/plugin-helpers`.\n';

if (config.kibanaRoot) {
process.stdout.write(
Expand Down

0 comments on commit 08f1a59

Please sign in to comment.