Skip to content

Commit

Permalink
Exit when failing to load external scripts from npm
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalpickles committed Mar 10, 2013
1 parent fc74231 commit b89d821
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/hubot
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ else
if data.length > 0
try
scripts = JSON.parse data
robot.loadExternalScripts scripts
catch err
console.error "Error parsing JSON data from external-scripts.json: #{err}"
process.exit(1)
robot.loadExternalScripts scripts

for path in Options.scripts
if path[0] == '/'
Expand Down
1 change: 1 addition & 0 deletions src/robot.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ class Robot
require(pkg) @
catch error
@logger.error "Error loading scripts from npm package - #{error}"
process.exit(1)

# Setup the Connect server's defaults.
#
Expand Down

0 comments on commit b89d821

Please sign in to comment.