diff --git a/lib/config/exec.js b/lib/config/exec.js index 0c0d234b..2e53b46a 100644 --- a/lib/config/exec.js +++ b/lib/config/exec.js @@ -79,7 +79,8 @@ function exec(nodemonOptions, execMap) { const script = expandScript(options.args[0], options.ext && ('.' + (options.ext || 'js').split(',')[0])); - if (script !== options.args[0]) { // if the script was found, shift it off our args + // if the script was found, shift it off our args + if (script !== options.args[0]) { options.script = script; options.args.shift(); }