From b7c6d3cd133254bed78806397355b8fce0f21b7a Mon Sep 17 00:00:00 2001 From: Deokgyu Yang Date: Sat, 24 Dec 2022 13:50:53 +0900 Subject: [PATCH] Add MSYS2 detection on Windows Terminal As the results of "uname -s" command is like the below on MSYS2 on Windows Terminal, MSYS_NT-10.0-22621 This patch fixes the Flutter command working on this kind of systems. Signed-off-by: Deokgyu Yang --- bin/dart | 2 +- bin/flutter | 2 +- bin/internal/shared.sh | 2 +- bin/internal/update_dart_sdk.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/dart b/bin/dart index 42743f7ae5633..0c1f402819bee 100755 --- a/bin/dart +++ b/bin/dart @@ -48,7 +48,7 @@ BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" OS="$(uname -s)" # If we're on Windows, invoke the batch script instead to get proper locking. -if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* ]]; then +if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* || $OS =~ MSYS.* ]]; then exec "${BIN_DIR}/dart.bat" "$@" fi diff --git a/bin/flutter b/bin/flutter index 591b0107cb329..9347b8dad6949 100755 --- a/bin/flutter +++ b/bin/flutter @@ -53,7 +53,7 @@ BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" OS="$(uname -s)" # If we're on Windows, invoke the batch script instead to get proper locking. -if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* ]]; then +if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* || $OS =~ MSYS.* ]]; then exec "${BIN_DIR}/flutter.bat" "$@" fi diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh index 76717114f546b..4a4d6534e71dc 100644 --- a/bin/internal/shared.sh +++ b/bin/internal/shared.sh @@ -200,7 +200,7 @@ function shared::execute() { # If running over git-bash, overrides the default UNIX executables with win32 # executables case "$(uname -s)" in - MINGW*) + MINGW* | MSYS* ) DART="$DART.exe" ;; esac diff --git a/bin/internal/update_dart_sdk.sh b/bin/internal/update_dart_sdk.sh index 49e4698a824ec..82bd39c1f913a 100755 --- a/bin/internal/update_dart_sdk.sh +++ b/bin/internal/update_dart_sdk.sh @@ -102,7 +102,7 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; t DART_ZIP_NAME="dart-sdk-linux-${ARCH}.zip" IS_USER_EXECUTABLE="-perm /u+x" ;; - MINGW*) + MINGW* | MSYS* ) DART_ZIP_NAME="dart-sdk-windows-x64.zip" IS_USER_EXECUTABLE="-perm /u+x" ;;