Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upstdout instead of stderr #112
Comments
This comment has been minimized.
This comment has been minimized.
|
Some previous discussion on this is in #21.
And FAQ on this: |
This comment has been minimized.
This comment has been minimized.
|
The previous thread on this sort of died off as no one was complaining about it. Perhaps this needs to be revisited? |
This comment has been minimized.
This comment has been minimized.
|
The tap-parser issue is easy to solve, just print every line prefixed by Alternatively, would you accept pull-requests for different formatters:
The only reason I suggest revisiting this is to follow standard unix convention** (** which means that output on stderr should be prefixed with |
This comment has been minimized.
This comment has been minimized.
|
@malandrew Thanks for the link about how stdout and stderr are supposed to work in unix programs. Very handy - I learned a few things. I don't want to solve this by introducing multiple formatters - that's a slippery slope... Let's just print the lint errors to stdout. I just tested There's one case where we'll continue printing the lint errors to stderr, and that's for |
This comment has been minimized.
This comment has been minimized.
|
@feross i don't feel strongly about printing to stderr/stdout and since tap-spec still works |
feross
added a commit
that referenced
this issue
Apr 14, 2015
This comment has been minimized.
This comment has been minimized.
|
Made a PR for this: #113 Please share feedback. |
feross
added a commit
that referenced
this issue
Apr 14, 2015
This comment has been minimized.
This comment has been minimized.
|
Does not change format behavior. Cool. |
feross
closed this
in
#113
Apr 14, 2015
This comment has been minimized.
This comment has been minimized.
|
Released as 3.6.0. |
andrewdeandrade commentedApr 13, 2015
Currently standard uses stderr for all output. This means that if you want to pipe standard, you need to redirect stderr to stdout with
2>&1 >/dev/null.All lint errors should instead be printed to stdout so unix pipes work.
The general semantics of stdout is "content I'm interested in if I'm running this program" and stderr is "any content that is not related to the functionality of this program". i.e. these lines are appropriate for stderr:
https://github.com/feross/standard/blob/master/bin/cmd.js#L89
https://github.com/feross/standard/blob/master/bin/cmd.js#L108