diff --git a/README.md b/README.md index 6517bc4..c3bbd2d 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,15 @@ jobs: # Version history +## v1.3 + * The install location of the Dart SDK is now available + in an environment variable, `DART_HOME` + ([#43](https://github.com/dart-lang/setup-dart/issues/43)) + + * Fixed a issue where cached downloads could lead to unzip issues + on self hosted runners + ([#35](https://github.com/dart-lang/setup-dart/issues/35)) + ## v1.2 * Fixed a path issue impacting git dependencies on Windows. diff --git a/setup.sh b/setup.sh index 58cd0bb..9aa1283 100755 --- a/setup.sh +++ b/setup.sh @@ -77,7 +77,7 @@ echo "Downloading ${URL}..." # Download installation zip. curl --connect-timeout 15 --retry 5 "$URL" > "${HOME}/dartsdk.zip" -unzip "${HOME}/dartsdk.zip" -d "${RUNNER_TOOL_CACHE}" > /dev/null +unzip -o "${HOME}/dartsdk.zip" -d "${RUNNER_TOOL_CACHE}" > /dev/null if [ $? -ne 0 ]; then echo -e "::error::Download failed! Please check passed arguments." exit 1 @@ -95,6 +95,7 @@ echo "PUB_CACHE=${PUBCACHE}" >> $GITHUB_ENV echo "Pub cache set to: ${PUBCACHE}" # Update paths. +echo "DART_HOME=${RUNNER_TOOL_CACHE}/dart-sdk/" >> $GITHUB_ENV echo "${PUBCACHE}/bin" >> $GITHUB_PATH echo "${RUNNER_TOOL_CACHE}/dart-sdk/bin" >> $GITHUB_PATH