Skip to content

Commit db8d1a4

Browse files
authored
Add MSYS2 detection on Windows Terminal (#117612)
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 <[email protected]> Signed-off-by: Deokgyu Yang <[email protected]>
1 parent ace4fb5 commit db8d1a4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

bin/dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
4848
OS="$(uname -s)"
4949

5050
# If we're on Windows, invoke the batch script instead to get proper locking.
51-
if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* ]]; then
51+
if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* || $OS =~ MSYS.* ]]; then
5252
exec "${BIN_DIR}/dart.bat" "$@"
5353
fi
5454

bin/flutter

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
5353
OS="$(uname -s)"
5454

5555
# If we're on Windows, invoke the batch script instead to get proper locking.
56-
if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* ]]; then
56+
if [[ $OS =~ MINGW.* || $OS =~ CYGWIN.* || $OS =~ MSYS.* ]]; then
5757
exec "${BIN_DIR}/flutter.bat" "$@"
5858
fi
5959

bin/internal/shared.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function shared::execute() {
200200
# If running over git-bash, overrides the default UNIX executables with win32
201201
# executables
202202
case "$(uname -s)" in
203-
MINGW*)
203+
MINGW* | MSYS* )
204204
DART="$DART.exe"
205205
;;
206206
esac

bin/internal/update_dart_sdk.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; t
102102
DART_ZIP_NAME="dart-sdk-linux-${ARCH}.zip"
103103
IS_USER_EXECUTABLE="-perm /u+x"
104104
;;
105-
MINGW*)
105+
MINGW* | MSYS* )
106106
DART_ZIP_NAME="dart-sdk-windows-x64.zip"
107107
IS_USER_EXECUTABLE="-perm /u+x"
108108
;;

0 commit comments

Comments
 (0)