Skip to content

Commit

Permalink
fix(cli): Write Node4+ error message to stderr (yarnpkg#5094)
Browse files Browse the repository at this point in the history
**Summary**

_To be a good citizen of UNIX ecosystem._

One may write a script to add `$(yarn global bin)` to `$PATH`, but one must consider different cases depending on what this command returns in STDOUT. This is not ideal. 

And, of course, error messages such as this naturally belongs to STDERR.
 
**Test plan**

```sh-session
$ yarn global bin 2>/dev/null
$
```
  • Loading branch information
BanzaiMan authored and BYK committed Dec 15, 2017
1 parent f965029 commit 0691037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/yarn
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ elif command_exists nodejs; then
exec nodejs "$basedir/yarn.js" "$@"
ret=$?
else
echo 'Yarn requires Node.js 4.0 or higher to be installed.'
>&2 echo 'Yarn requires Node.js 4.0 or higher to be installed.'
ret=1
fi

Expand Down

0 comments on commit 0691037

Please sign in to comment.