mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[config] throw if config file has a syntax error (elastic/kibana-plugin-helpers#65)
(cherry picked from commit elastic/kibana-plugin-helpers@487dd70bdb) Original commit: elastic/kibana-plugin-helpers@04026d9322
This commit is contained in:
parent
1e2769b613
commit
ef3cb80e04
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,10 @@ 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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue