Skip to content

Commit

Permalink
Fix failure when only script is declared
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane A. Stillwell committed Jan 13, 2014
1 parent 945162c commit 465538c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ var nodemon = require('nodemon')
, gulp = require('gulp')

module.exports = function (settings) {
settings = settings || { script: '', args: '' }
settings = settings || {}
settings.script = settings.script || ''
settings.options = settings.options || ''

options = ['nodemon', settings.script].concat(settings.options.split(' '))

try {
Expand Down Expand Up @@ -33,4 +36,4 @@ module.exports = function (settings) {
}

} catch (e) { throw e }
}
}

0 comments on commit 465538c

Please sign in to comment.