From c08749ae1a999311ad4a08cfca8ec1edae7b69e2 Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Sat, 22 Jul 2023 01:52:35 +0000 Subject: [PATCH] Fix wrong flutter_tools.stamp version check in shared.sh (#196) This change fixes wrong flutter_tools.stamp version check in shared.sh. Fixed #195 Signed-off-by: Hidenori Matsubayashi --- bin/internal/shared.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh index 454dc63..912f902 100644 --- a/bin/internal/shared.sh +++ b/bin/internal/shared.sh @@ -68,8 +68,14 @@ function update_flutter() { # Invalidate the flutter cache. local stamp_path="$FLUTTER_DIR/bin/cache/flutter_tools.stamp" - if [[ ! -f "$stamp_path" || "$version" != "$(cat "$stamp_path")" ]]; then + if [[ ! -f "$stamp_path" ]]; then "$FLUTTER_EXE" --version + else + local v="$(cat "$stamp_path")" + v="${v%%:*}" + if [[ "$version" != "$v" ]]; then + "$FLUTTER_EXE" --version + fi fi }