Skip to content

Help output truncated on Node 6.2 #842

@garthk

Description

@garthk

… because standard output isn't set non-blocking before output and process.exit, which in turn inflicts nodejs/node#6456.

Reproduction:

$ node --version
v6.2.0
$ nodemon --version
1.9.2
$ nodemon -h
  Usage: nodemon [options] [script.js] [args]

  Options:

  -e, --ext ................ extensions to look for, ie. js,jade,hbs.
  -x, --exec app ........... execute script with "app", ie. -x "python -v".
  -w, --watch dir........... watch directory "dir" or files. use once for
                             each directory or file to watch.
  -i, --ignore ............. ignore specific files or directories.
  -q, --quiet .............. minimise nodemon messages to start/stop only.
  -V, --verbose ............ show detail on what is causing restarts.
  -I, --no-stdin ........... don't try to read from stdin.
  -C, --on-change-only ..... execute script on change only, not startup
  --no-colors .............. disable color output
  -d, --delay n ............ debounce restart for "n" seconds.
  --exitcrash .............. exit on crash, allows use of nodemon with daemon
                             tools like forever.js.
  -v, --version ............ current nodemon version.
  -h, --help ............$

Workaround: nodemon --help | less, though I have no idea why that helps.

Fix:

process.stdout._handle.setBlocking(true);
// output help
process.exit(0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions