diff --git a/drush b/drush index 323fc6f..10e60da 100755 --- a/drush +++ b/drush @@ -37,7 +37,8 @@ esac # error message is suppressed, but tput cols becomes confused about the # terminal and prints out the default value (80). if [ -z $COLUMNS ] && [ -n "$TERM" ] && [ "$TERM" != dumb ] && [ ! -z "`which tput`" ] ; then - # Note to cygwin users: install the ncurses package to get tput command. + # Note to cygwin/mingw/msys users: install the ncurses package to get tput command. + # Note to mingw/msys users: there is no precompiled ncurses package. if COLUMNS="`tput cols`"; then export COLUMNS fi diff --git a/includes/drush.inc b/includes/drush.inc index 13535f6..9ae2fc1 100644 --- a/includes/drush.inc +++ b/includes/drush.inc @@ -926,7 +926,7 @@ function drush_download_file($url, $destination = FALSE, $cache_duration = 0) { function _drush_download_file($url, $destination, $overwrite = TRUE) { static $use_wget; if ($use_wget === NULL) { - $use_wget = drush_shell_exec('which wget'); + $use_wget = drush_shell_exec('wget --version'); } $destination_tmp = drush_tempnam('download_file'); diff --git a/includes/environment.inc b/includes/environment.inc index 4f2ae73..52e9504 100644 --- a/includes/environment.inc +++ b/includes/environment.inc @@ -644,14 +644,16 @@ function drush_is_mingw($os = NULL) { * Return tar executable name specific for the current OS */ function drush_get_tar_executable() { - return drush_is_windows() ? "bsdtar.exe" : "tar"; + return drush_is_windows() ? (drush_is_mingw() ? "tar.exe" : "bsdtar.exe") : "tar"; } /** * Checks if the operating system has bash. + * + * MinGW has bash, but PHP isn't part of MinGW and hence doesn't run in bash. */ function drush_has_bash($os = NULL) { - return drush_is_cygwin($os) || !drush_is_windows($os); + return (drush_is_cygwin($os) && !drush_is_mingw($os)) || !drush_is_windows($os); } /*