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

"nodemon --help >/dev/null" throws an error #1439

Closed
peternann opened this issue Oct 20, 2018 · 3 comments
Closed

"nodemon --help >/dev/null" throws an error #1439

peternann opened this issue Oct 20, 2018 · 3 comments

Comments

@peternann
Copy link

  • nodemon -v: 1.18.4
  • node -v: v8.10.0
  • Operating system/terminal environment: Linux 4.9.0-8-amd64 tell me if i broke anything #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux
  • Command you ran: nodemon --help >/dev/null

Expected behaviour

Exit silently, with success exit status (0)

Actual behaviour

Throws this error:

/home/peter/.nvm/versions/node/v8.10.0/lib/node_modules/nodemon/lib/nodemon.js:42
    process.stdout._handle.setBlocking(true); // nodejs/node#6456
                           ^

TypeError: Cannot read property 'setBlocking' of undefined
    at nodemon (/home/peter/.nvm/versions/node/v8.10.0/lib/node_modules/nodemon/lib/nodemon.js:42:28)
    at Object.<anonymous> (/home/peter/.nvm/versions/node/v8.10.0/lib/node_modules/nodemon/bin/nodemon.js:7:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3

Steps to reproduce

Run:
nodemon --help >/dev/null

########
I was trying to use this command to check for existence of nodemon, and install if necessary.
I guess I will instead use type nodemon >/dev/null 2>&1 || npm install -g nodemon.
But it's a bit naff that nodemon crashes in this usage.

@stale
Copy link

stale bot commented Nov 3, 2018

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 Nov 3, 2018
@peternann
Copy link
Author

Well, personally, I reckon this should be fixed.

@stale stale bot removed the stale no activity for 2 weeks label Nov 5, 2018
@remy
Copy link
Owner

remy commented Nov 5, 2018

@peternann I agree that if you feel personally about an issue, it should definitely be fixed. Happy to merge your PR (it will need at least a single test to show the issue too).

Cheers 👍

@remy remy closed this as completed Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants