Rustup is now installing files into other place?

In my azure pipelines config I have:

      curl -sSf -o rustup-init.exe
      rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
      echo ##vso[task.setvariable variable=PATH]%PATH%;%USERPROFILE%\.cargo\bin

and starting today this is wrong script, because of after install path is not %USERPROFILE%\.cargo\bin as I expected, but instead C:\Program Files\Rust\.cargo\bin.

Is something changed in rustup or it is azure pipelines failure?

1 Like

Check if CARGO_HOME or RUSTUP_HOME environment variables are set when you’re running the install (I don’t remember exactly which specifies what, but I think both are relevant to where rustup puts stuff).


But this is inside virtual machine provided by Microsoft, I did not change anything in it’s yaml config during week or so. So how these new envrironemnt variables can appear, MS added rust to default azure pipeline VM?

The Ubuntu image at least appears to have it. The windows image READMEs don’t list it, but there is a powershell script for installing it.


Looks like this is the issue. I setted environment variable to ignore pre-installed rustc and all build becomes green again.

The newest images of Azure Pipelines have rustup installed for all OSes. You can see more here:[]