From a45a6775eb10114e275afcac5d86948238c3791d Mon Sep 17 00:00:00 2001 From: mikew Date: Wed, 26 Apr 2017 07:57:30 -0700 Subject: [PATCH] Change `use_winpty` logic in bin/yarn to just look at YARN_FORCE_WINPTY in environment (#3245) --- bin/yarn | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/yarn b/bin/yarn index ac4a86a751..4c71f7083c 100755 --- a/bin/yarn +++ b/bin/yarn @@ -2,12 +2,9 @@ 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() { @@ -15,7 +12,7 @@ command_exists() { } 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" "$@"