Skip to content

Commit 3c4d4c4

Browse files
committed
Check FLUTTER_DOWNLOAD_URL before download the archive
1 parent b947f9b commit 3c4d4c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

action.sh

+4
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ if [ ! -d "${FLUTTER_RUNNER_TOOL_CACHE}" ]; then
103103
FLUTTER_BUILD="flutter_${FLUTTER_BUILD_OS}_${FLUTTER_VERSION}-${FLUTTER_CHANNEL}.${EXT}"
104104
FLUTTER_DOWNLOAD_URL=${FLUTTER_DOWNLOAD_URL:-"${FLUTTER_RELEASE_BASE_URL}/${FLUTTER_CHANNEL}/${FLUTTER_OS}/${FLUTTER_BUILD}"}
105105

106+
if [[ -z "${FLUTTER_DOWNLOAD_URL}" ]]; then
107+
echo -e "::error::Failed to determine the download URL for Flutter SDK."
108+
exit 1
109+
fi
106110
# Download installation archive
107111
echo "Downloading ${FLUTTER_DOWNLOAD_URL}"
108112
DOWNLOAD_PATH="${RUNNER_TEMP}/${FLUTTER_BUILD}"

0 commit comments

Comments
 (0)