Skip to content

Commit 95a57f2

Browse files
authored
Fix Nushell installation failures (#2475)
* Try using cargo binstall for installing Nushell * Remove leftover lines * Use platform package managers on MacOS+Windows
1 parent 206e8ad commit 95a57f2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,15 @@ jobs:
3636
- { os: macos-12, py: "[email protected]" }
3737
- { os: macos-12, py: "[email protected]" }
3838
steps:
39+
- uses: taiki-e/install-action@cargo-binstall
3940
- name: Install OS dependencies
4041
run: |
4142
for i in 1 2 3; do
4243
echo "try $i" && \
4344
${{ runner.os == 'Linux' && 'sudo apt-get update -y && sudo apt-get install snapd fish csh -y' || true }} && \
44-
${{ runner.os == 'Linux' && 'sudo apt-get install curl wget -y' || true }} && \
45-
${{ runner.os == 'Linux' && 'nushell_url=$(curl -s https://api.github.com/repos/nushell/nushell/releases/latest | grep "browser_" | grep "x86_64" | grep "linux" | grep "gnu" | cut -d\" -f4 )' || true }} && \
46-
${{ runner.os == 'Linux' && 'wget -O nushell.tar.gz $nushell_url' || true }} && \
47-
${{ runner.os == 'Linux' && 'tar -zxf nushell.tar.gz' || true }} && \
48-
${{ runner.os == 'Linux' && 'sudo cp nu-*-x86_64-unknown-linux-gnu/nu /usr/bin' || true }} && \
49-
${{ runner.os == 'Windows' && 'choco install nushell' || true }} && \
45+
${{ runner.os == 'Linux' && 'cargo binstall -y nu' || true }} && \
5046
${{ runner.os == 'macOS' && 'brew install fish tcsh nushell' || true }} && \
47+
${{ runner.os == 'Windows' && 'choco install nushell' || true }} && \
5148
exit 0 || true;
5249
done
5350
exit 1

0 commit comments

Comments
 (0)