Empty yaml file causes error
When merging in an empty yaml file an error is thrown from tea-merge.
Error: Incompatible merge scenario. at merge (/github/gcpvp/game-server/node_modules/tea-merge/lib/merge.js:79:11) at module.exports (/github/gcpvp/game-server/node_modules/tea-merge/lib/merge.js:61:5) at Etc.push (/github/gcpvp/game-server/node_modules/etc/etc.js:33:15) at Etc.file (/github/gcpvp/game-server/node_modules/etc/etc.js:147:24)
The file is currently empty because I hadn't put anything in it yet and was setting up the code to load up the configuration files. I'm actually merging in two files to generate the full config options. The first file actually has an option set in it.
Heres the code i'm using:
const etc = require('etc')(); etc.use(require('etc-yaml')); etc.file(root_dir+'common/config/config.inc.yaml'); etc.file(root_dir+'config/config.inc.yaml'); //<--- the empty file var config_json = etc.toJSON();
Hey @ronaldfenner thanks for the report! I'm not using this module as actively as I used to, but I'd happily merge a PR 😄