From dad2e66f525c098930370c0a3f5cefa42a29d830 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 8 May 2017 17:01:59 -0600 Subject: [PATCH] allow empty config file --- bin/goldilocks.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/goldilocks.js b/bin/goldilocks.js index dde578b..3a3403d 100755 --- a/bin/goldilocks.js +++ b/bin/goldilocks.js @@ -56,6 +56,10 @@ function readConfigAndRun(args) { } catch(e) { try { config = require('js-yaml').safeLoad(text); + // blank config file + if ('undefined' === typeof config) { + config = {}; + } } catch(e) { throw new Error( "Could not load '" + filename + "' as JSON nor YAML"