Skip to content

Commit

Permalink
Change use_winpty logic in bin/yarn to just look at YARN_FORCE_WINP…
Browse files Browse the repository at this point in the history
…TY in environment (#3245)
  • Loading branch information
mikew authored and bestander committed Apr 26, 2017
1 parent d54fff3 commit a45a677
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bin/yarn
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@
argv0=$(echo "$0" | sed -e 's,\\,/,g')
basedir=$(dirname "$(readlink "$0" || echo "$argv0")")

use_winpty=0

case "$(uname -s)" in
Linux) basedir=$(dirname "$(readlink -f "$0" || echo "$argv0")");;
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
MSYS*|MINGW*) use_winpty=1;;
esac

command_exists() {
command -v "$1" >/dev/null 2>&1;
}

if command_exists node; then
if [ $use_winpty -eq 1 ]; then
if [ "$YARN_FORCE_WINPTY" -eq 1 ]; then
winpty node "$basedir/yarn.js" "$@"
else
node "$basedir/yarn.js" "$@"
Expand Down

0 comments on commit a45a677

Please sign in to comment.