diff --git a/vpython b/vpython index 4375390c9..45b0d02b5 100755 --- a/vpython +++ b/vpython @@ -41,8 +41,11 @@ base_dir=$(dirname "$0") source "$base_dir/cipd_bin_setup.sh" cipd_bin_setup &> /dev/null -if [[ $(uname -s) = MINGW* || $(uname -s) = CYGWIN* ]]; then +case $(uname -s) in +MINGW*|CYGWIN*) cmd.exe //c $0.bat "$@" -else + ;; +*) exec "$base_dir/.cipd_bin/vpython" "$@" -fi + ;; +esac diff --git a/vpython3 b/vpython3 index bcc63f935..27fcfc05a 100755 --- a/vpython3 +++ b/vpython3 @@ -39,8 +39,11 @@ base_dir=$(dirname "$0") source "$base_dir/cipd_bin_setup.sh" cipd_bin_setup &> /dev/null -if [[ $(uname -s) = MINGW* || $(uname -s) = CYGWIN* ]]; then +case $(uname -s) in +MINGW*|CYGWIN*) cmd.exe //c $0.bat "$@" -else + ;; +*) exec "$base_dir/.cipd_bin/vpython3" "$@" -fi + ;; +esac