Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support interactive commands in standard MINGW as well #2243

Merged
merged 3 commits into from
Dec 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bin/yarn
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/sh
basedir=$(dirname "$(readlink "$0" || echo "$(echo "$0" | sed -e 's,\\,/,g')")")

is_msys=0
use_winpty=0

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
*MSYS_NT*) is_msys=1;;
MSYS*|MINGW*) use_winpty=1;;
esac

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

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