Better error display for "npm run" and config.json

This commit is contained in:
Nick Farina
2015-08-20 21:38:29 -07:00
parent 5f1df2792f
commit 64c665cebb
2 changed files with 5 additions and 3 deletions

6
app.js
View File

@@ -34,8 +34,10 @@ try {
config = JSON.parse(fs.readFileSync(configPath)); config = JSON.parse(fs.readFileSync(configPath));
} }
catch (err) { catch (err) {
console.log("There was a problem reading your config.json file:\n\n" + err.stack); console.log("There was a problem reading your config.json file.");
process.exit(0); 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 // pull out our custom Bridge settings from config.json, if any

View File

@@ -3,7 +3,7 @@
"description": "HomeKit support for the impatient", "description": "HomeKit support for the impatient",
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"start": "DEBUG=* node app.js" "start": "DEBUG=* node app.js || true"
}, },
"repository": { "repository": {
"type": "git", "type": "git",