From a5fa3d4041a7f67e03c1c78f5fcc0640cf633f83 Mon Sep 17 00:00:00 2001 From: Barabas Raffai Date: Fri, 21 Jun 2024 09:48:28 +0100 Subject: [PATCH] Fix existing installation not detected after restoring cache --- src/scripts/install-sdk.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/scripts/install-sdk.sh b/src/scripts/install-sdk.sh index 424da5a..e5081a3 100644 --- a/src/scripts/install-sdk.sh +++ b/src/scripts/install-sdk.sh @@ -26,16 +26,13 @@ function install_flutter() { rm -f "flutter_sdk.${suffix}" } +echo "export PATH=$INSTALL_LOCATION/flutter/bin:\$PATH" >> "$BASH_ENV" +# shellcheck source=/dev/null +source "$BASH_ENV" if ! command -v flutter &> /dev/null; then install_flutter "$(uname)" "$(uname -m)" + echo "Flutter installed: $(eval command -v flutter)" else echo "Previous Flutter installation detected: $(eval command -v flutter)" - exit 0 fi - -echo "export PATH=$INSTALL_LOCATION/flutter/bin:\$PATH" >> "$BASH_ENV" - -# shellcheck source=/dev/null -source "$BASH_ENV" -which flutter