Use cargo binstall in setup scripts (#340)
* use cargo binstall if it exists * powershell
This commit is contained in:
parent
8edce35f76
commit
4286f054ec
2 changed files with 2 additions and 3 deletions
|
|
@ -198,8 +198,7 @@ https://learn.microsoft.com/windows/package-manager/winget/
|
|||
|
||||
Write-Host
|
||||
Write-Host 'Installing Rust tools...' -ForegroundColor Yellow
|
||||
cargo install cargo-watch
|
||||
cargo install sqlx-cli
|
||||
if (Get-Command cargo-binstall -ea 0) { cargo binstall cargo-watch sqlx-cli } else { cargo install cargo-watch sqlx-cli }
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Exit-WithError 'Failed to install Rust tools'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ esac
|
|||
if [ "${CI:-}" != "true" ]; then
|
||||
echo "installing rust tools..."
|
||||
_tools="cargo-watch sqlx-cli"
|
||||
echo "$_tools" | xargs cargo install
|
||||
echo "$_tools" | xargs cargo $(has cargo-binstall && echo binstall || echo install)
|
||||
fi
|
||||
|
||||
echo 'your machine has been setup for onelauncher development!'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue