Skip to content

Commit e391a10

Browse files
authored
Merge pull request #20 from dart-lang/mit-mit-patch-1
Fix pub global on Windows + add test
2 parents 0ef94d3 + 5221f7c commit e391a10

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.github/workflows/dart.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,25 @@ jobs:
4444
run: |
4545
echo "main() { print('hello world'); }" > hello.dart
4646
dart hello.dart
47+
48+
test_pub:
49+
runs-on: ${{ matrix.os }}
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
os: [ubuntu-latest, macos-latest, windows-latest]
54+
sdk: [stable, beta]
55+
steps:
56+
- uses: actions/checkout@v2
57+
- uses: ./
58+
with:
59+
sdk: ${{ matrix.sdk }}
60+
61+
- name: Global activate + run
62+
run: |
63+
dart pub global activate stagehand
64+
mkdir testapp
65+
cd testapp
66+
stagehand console-simple
67+
dart pub get
68+
dart run

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ jobs:
169169

170170
# Version history
171171

172+
## v0.5
173+
* Fixed a Windows `pub global activate` path issue.
174+
172175
## v0.4
173176

174177
* Removed previously deprecated input `channel`. Use the `sdk` input instead.

setup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ if [ $? -ne 0 ]; then
5959
fi
6060
rm "${HOME}/dartsdk.zip"
6161

62+
# Configure pub to use a fixed location.
63+
echo "PUB_CACHE=${HOME}/.pub-cache" >> $GITHUB_ENV
64+
6265
# Update paths.
6366
echo "${HOME}/.pub-cache/bin" >> $GITHUB_PATH
6467
echo "${RUNNER_TOOL_CACHE}/dart-sdk/bin" >> $GITHUB_PATH

0 commit comments

Comments
 (0)