Use $Env:CARGO_HOME in ps1 install script #1509
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have
$env:CARGO_HOME
set and just had this warning tell me I was missing the wrong path from my path. This makes the ps1 script do the same thing as the sh script and look in$env:CARGO_HOME
if present.I originally used
??
to null coalesce, but switched to just anif
expression since??
was only added in pwsh 7 (PowerShell Core, the cross platform one you need to install), thus isn't available in Windows Powershell. Theif
works in Windows PowerShell as well.