Skip to content

Commit 7e4ec4f

Browse files
authored
Fix unzip issue and add home variable (#44)
1 parent ade92c2 commit 7e4ec4f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,15 @@ jobs:
176176

177177
# Version history
178178

179+
## v1.3
180+
* The install location of the Dart SDK is now available
181+
in an environment variable, `DART_HOME`
182+
([#43](https://github.com/dart-lang/setup-dart/issues/43))
183+
184+
* Fixed a issue where cached downloads could lead to unzip issues
185+
on self hosted runners
186+
([#35](https://github.com/dart-lang/setup-dart/issues/35))
187+
179188
## v1.2
180189
* Fixed a path issue impacting git dependencies on Windows.
181190

setup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ echo "Downloading ${URL}..."
7777

7878
# Download installation zip.
7979
curl --connect-timeout 15 --retry 5 "$URL" > "${HOME}/dartsdk.zip"
80-
unzip "${HOME}/dartsdk.zip" -d "${RUNNER_TOOL_CACHE}" > /dev/null
80+
unzip -o "${HOME}/dartsdk.zip" -d "${RUNNER_TOOL_CACHE}" > /dev/null
8181
if [ $? -ne 0 ]; then
8282
echo -e "::error::Download failed! Please check passed arguments."
8383
exit 1
@@ -95,6 +95,7 @@ echo "PUB_CACHE=${PUBCACHE}" >> $GITHUB_ENV
9595
echo "Pub cache set to: ${PUBCACHE}"
9696

9797
# Update paths.
98+
echo "DART_HOME=${RUNNER_TOOL_CACHE}/dart-sdk/" >> $GITHUB_ENV
9899
echo "${PUBCACHE}/bin" >> $GITHUB_PATH
99100
echo "${RUNNER_TOOL_CACHE}/dart-sdk/bin" >> $GITHUB_PATH
100101

0 commit comments

Comments
 (0)