Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unzip issue and add home variable #44

Merged
merged 2 commits into from Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
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
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