Home > Mobile >  How to install Rust using power shell?
How to install Rust using power shell?

Time:08-09

I want to install rust automatically via command line on Windows. It doesn't matter if it's power shell or not but I think power shell is the easiest without having to install other stuff manually.

I found https://www.powershellgallery.com/packages/AppVeyorBYOC/1.0.170/Content/scripts\Windows\install_rust.ps1 but at

 Add-SessionPath "$env:USERPROFILE\.cargo\bin"

it says that Add-SessionPath is a cmdlet that does not exist.

CodePudding user response:

I had the same error. I changed that line to this and the script worked with Powershell 7.

$env:Path = "$env:USERPROFILE\.cargo\bin"
  • Related