Skip to content

Fix pub cache issue in Windows #39

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

Merged
merged 6 commits into from
Jul 26, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: example
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: ">=2.12.0 <3.0.0"

dependencies:
characters:
git: https://github.com/dart-lang/characters

dev_dependencies:
test: any
11 changes: 9 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,17 @@ fi
rm "${HOME}/dartsdk.zip"

# Configure pub to use a fixed location.
echo "PUB_CACHE=${HOME}/.pub-cache" >> $GITHUB_ENV
if [[ $OS == windows ]]
then
PUBCACHE="${USERPROFILE}\\.pub-cache"
else
PUBCACHE="${HOME}/.pub-cache"
fi
echo "PUB_CACHE=${PUBCACHE}" >> $GITHUB_ENV
echo "Pub cache set to: ${PUBCACHE}"

# Update paths.
echo "${HOME}/.pub-cache/bin" >> $GITHUB_PATH
echo "${PUBCACHE}/bin" >> $GITHUB_PATH
echo "${RUNNER_TOOL_CACHE}/dart-sdk/bin" >> $GITHUB_PATH

# Report success, and print version.
Expand Down