Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shouldFork -check is not working properly if there is a dash in the file path #1554

Labels
stale no activity for 2 weeks

Comments

@sampsasaarela
Copy link

  • 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

  1. Create new app with path like ./my-app/index.js
  2. 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?

forivall added a commit to forivall/nodemon that referenced this issue Apr 23, 2019
forivall added a commit to forivall/nodemon that referenced this issue Apr 23, 2019
@stale
Copy link

stale bot commented Apr 27, 2019

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Apr 27, 2019
@remy remy closed this as completed in #1558 May 1, 2019
remy pushed a commit that referenced this issue May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment