Skip to content

Commit

Permalink
Fix Nushell installation failures (#2475)
Browse files Browse the repository at this point in the history
* Try using cargo binstall for installing Nushell

* Remove leftover lines

* Use platform package managers on MacOS+Windows
  • Loading branch information
kubouch authored Dec 29, 2022
1 parent 206e8ad commit 95a57f2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,15 @@ jobs:
- { os: macos-12, py: "brew@3.9" }
- { os: macos-12, py: "brew@3.8" }
steps:
- uses: taiki-e/install-action@cargo-binstall
- name: Install OS dependencies
run: |
for i in 1 2 3; do
echo "try $i" && \
${{ runner.os == 'Linux' && 'sudo apt-get update -y && sudo apt-get install snapd fish csh -y' || true }} && \
${{ runner.os == 'Linux' && 'sudo apt-get install curl wget -y' || true }} && \
${{ 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 }} && \
${{ runner.os == 'Linux' && 'wget -O nushell.tar.gz $nushell_url' || true }} && \
${{ runner.os == 'Linux' && 'tar -zxf nushell.tar.gz' || true }} && \
${{ runner.os == 'Linux' && 'sudo cp nu-*-x86_64-unknown-linux-gnu/nu /usr/bin' || true }} && \
${{ runner.os == 'Windows' && 'choco install nushell' || true }} && \
${{ runner.os == 'Linux' && 'cargo binstall -y nu' || true }} && \
${{ runner.os == 'macOS' && 'brew install fish tcsh nushell' || true }} && \
${{ runner.os == 'Windows' && 'choco install nushell' || true }} && \
exit 0 || true;
done
exit 1
Expand Down

0 comments on commit 95a57f2

Please sign in to comment.