nodemon -v: 1.18.11
node -v: v8.10.0
- Operating system/terminal environment: macosx
- Using Docker? What image: node-alpine
Expected behaviour
Start child process as forked
Actual behaviour
Starts child process as spawned
Steps to reproduce
- Create new app with path like
./my-app/index.js
- Start
nodemon ./my-app/index.js
I think the problem is in lib/monitor/run.js#L94:
firstArg.indexOf('-') === -1 && // don't fork if there's a node exec arg
this return false, since my app path has - in its path. Or am I missing something here? If I rename my app like ./my-app/index.js -> ./myapp/index.jsit works and starts as forked as expected. Not sure what is the purpose of this indexOf check here? Could it be just removed because there is also executable === 'node' check?
nodemon -v: 1.18.11node -v: v8.10.0Expected behaviour
Start child process as forked
Actual behaviour
Starts child process as spawned
Steps to reproduce
./my-app/index.jsnodemon ./my-app/index.jsI think the problem is in lib/monitor/run.js#L94:
firstArg.indexOf('-') === -1 && // don't fork if there's a node exec argthis return false, since my app path has
-in its path. Or am I missing something here? If I rename my app like./my-app/index.js->./myapp/index.jsit works and starts as forked as expected. Not sure what is the purpose of this indexOf check here? Could it be just removed because there is alsoexecutable === 'node'check?