Skip to content

Commit

Permalink
Fix latest version detection error when running on GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
socheatsok78 committed Dec 13, 2024
1 parent 6ac6de3 commit 1b906b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [[ $FLUTTER_VERSION == "latest" ]]; then
# Determine the latest Flutter SDK version
if [ -f "$FLUTTER_RELEASE_MANIFEST_FILE" ]; then
__FLUTTER_CURRENT_RELEASE=$(jq -r ".current_release.${FLUTTER_CHANNEL}" "$FLUTTER_RELEASE_MANIFEST_FILE")
__QUERY="select(.hash == \"${__FLUTTER_CURRENT_RELEASE}\" and .dart_sdk_arch == \"${ARCH}\")"
__QUERY="select(.hash == \"${__FLUTTER_CURRENT_RELEASE}\" and .dart_sdk_arch == \"${FLUTTER_ARCH}\")"
FLUTTER_VERSION=$(jq -r ".releases | map(${__QUERY}) | .[0].version" "$FLUTTER_RELEASE_MANIFEST_FILE")
if [ -z "$FLUTTER_VERSION" ] || [ "$FLUTTER_VERSION" == "null" ]; then
echo -e "::error::Failed to determine the latest Flutter SDK version."
Expand Down

0 comments on commit 1b906b3

Please sign in to comment.