mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-25 06:40:03 +00:00
Add cargo-binstall installation path to GITHUB_PATH (#1748)
* Add cargo-binstall installation path to GITHUB_PATH in install-from-binstall-release.sh Fixed #1714 * Add cargo-binstall installation path to GITHUB_PATH in install-from-binstall-release.ps1 * Update install-script.yml to test * Fix use of env var in install-from-binstall-release.ps1
This commit is contained in:
parent
9a270f03b6
commit
05f488322e
3 changed files with 14 additions and 9 deletions
|
@ -20,7 +20,11 @@ Remove-Item -Force $tmpdir\cargo-binstall.zip
|
|||
Remove-Item -Recurse -Force $tmpdir\cargo-binstall
|
||||
$cargo_home = if ($Env:CARGO_HOME -ne $null) { $Env:CARGO_HOME } else { "$HOME\.cargo" }
|
||||
if ($Env:Path -split ";" -notcontains "$cargo_home\bin") {
|
||||
Write-Host ""
|
||||
Write-Host "Your path is missing $cargo_home\bin, you might want to add it." -ForegroundColor Red
|
||||
Write-Host ""
|
||||
if (($Env:CI -ne $null) -and ($Env:GITHUB_PATH -ne $null)) {
|
||||
Add-Content -Path "$Env:GITHUB_PATH" -Value "$cargo_home\bin"
|
||||
} else {
|
||||
Write-Host ""
|
||||
Write-Host "Your path is missing $cargo_home\bin, you might want to add it." -ForegroundColor Red
|
||||
Write-Host ""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue