Skip to content

Commit

Permalink
Fix unzip issue and add home variable (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
mit-mit committed Oct 8, 2021
1 parent ade92c2 commit 7e4ec4f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 2 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 7e4ec4f

Please sign in to comment.