From 00c3aedf400a64071861738d12e385e4a704f808 Mon Sep 17 00:00:00 2001 From: Socheat Sok Date: Fri, 13 Dec 2024 17:21:51 +0700 Subject: [PATCH] Fix variables FLUTTER_OS --- action.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.sh b/action.sh index 99234ec..7152f34 100755 --- a/action.sh +++ b/action.sh @@ -53,7 +53,7 @@ fi # Fix Flutter SDK version for Apple Silicon FLUTTER_BUILD_OS=$FLUTTER_OS -if [[ $OS == "macos" && $ARCH == "arm64" ]]; then +if [[ $FLUTTER_OS == "macos" && $FLUTTER_ARCH == "arm64" ]]; then if [[ $FLUTTER_VERSION < 3.* ]]; then echo -e "::error::Flutter SDK version \"${FLUTTER_VERSION}\" is not supported on Apple Silicon. Please use version 3.0.0 or higher." exit 1 @@ -108,7 +108,7 @@ if [ ! -d "${FLUTTER_RUNNER_TOOL_CACHE}" ]; then # Extracting installation archive echo -n "Extracting Flutter SDK archive..." - if [[ $OS == linux ]] + if [[ $FLUTTER_OS == linux ]] then tar -C "${FLUTTER_RUNNER_TOOL_CACHE}" -xf ${FLUTTER_BUILD_ARTIFACT_FILE} >/dev/null EXTRACT_ARCHIVE_CODE=$? @@ -123,7 +123,7 @@ if [ ! -d "${FLUTTER_RUNNER_TOOL_CACHE}" ]; then exit 1 fi else - echo "Flutter SDK version restored from cache: ${FLUTTER_VERSION} (${FLUTTER_CHANNEL}) on \"${FLUTTER_OS}_${ARCH}\"" + echo "Flutter SDK version restored from cache: ${FLUTTER_VERSION} (${FLUTTER_CHANNEL}) on \"${FLUTTER_OS}_${FLUTTER_ARCH}\"" fi # Configure pub to use a fixed location.