From 64c665cebb3acd0beb2995e8a5e8450edc3d24a2 Mon Sep 17 00:00:00 2001 From: Nick Farina Date: Thu, 20 Aug 2015 21:38:29 -0700 Subject: [PATCH] Better error display for "npm run" and config.json --- app.js | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 235f53e..f4423b3 100644 --- a/app.js +++ b/app.js @@ -34,8 +34,10 @@ try { config = JSON.parse(fs.readFileSync(configPath)); } catch (err) { - console.log("There was a problem reading your config.json file:\n\n" + err.stack); - process.exit(0); + console.log("There was a problem reading your config.json file."); + console.log("Please try pasting your config.json file here to validate it: http://jsonlint.com"); + console.log(""); + throw err; } // pull out our custom Bridge settings from config.json, if any diff --git a/package.json b/package.json index cc9207e..83159a1 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "HomeKit support for the impatient", "version": "0.0.0", "scripts": { - "start": "DEBUG=* node app.js" + "start": "DEBUG=* node app.js || true" }, "repository": { "type": "git",