Skip to content

Commit

Permalink
Tweaks to DART_HOME (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
mit-mit committed Oct 11, 2021
1 parent 7e4ec4f commit 6a218f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
with:
sdk: ${{ matrix.sdk }}

- name: Print DART_HOME
shell: bash
run: echo "Dart SDK installed in $DART_HOME"

- name: Run hello world
run: |
echo "main() { print('hello world'); }" > hello.dart
Expand Down
4 changes: 3 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@ rm "${HOME}/dartsdk.zip"
if [[ $OS == windows ]]
then
PUBCACHE="${USERPROFILE}\\.pub-cache"
DART_HOME="${RUNNER_TOOL_CACHE}\\dart-sdk"
else
PUBCACHE="${HOME}/.pub-cache"
DART_HOME="${RUNNER_TOOL_CACHE}/dart-sdk"
fi
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 "DART_HOME=${DART_HOME}" >> $GITHUB_ENV
echo "${PUBCACHE}/bin" >> $GITHUB_PATH
echo "${RUNNER_TOOL_CACHE}/dart-sdk/bin" >> $GITHUB_PATH

Expand Down

0 comments on commit 6a218f2

Please sign in to comment.