mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-14 13:56:47 +00:00
Initialize rust environment to get software report (#4774)
This commit is contained in:
committed by
GitHub
parent
d2c5a46fcf
commit
6846f12d42
@@ -1,3 +1,9 @@
|
||||
function Initialize-RustEnvironment {
|
||||
$env:RUSTUP_HOME = "C:\Users\Default\.rustup"
|
||||
$env:CARGO_HOME = "C:\Users\Default\.cargo"
|
||||
$env:Path += ";$env:CARGO_HOME\bin"
|
||||
}
|
||||
|
||||
function Get-OSName {
|
||||
return (Get-CimInstance -ClassName Win32_OperatingSystem).Caption
|
||||
}
|
||||
@@ -14,6 +20,7 @@ function Get-BashVersion {
|
||||
}
|
||||
|
||||
function Get-RustVersion {
|
||||
Initialize-RustEnvironment
|
||||
$rustVersion = [regex]::matches($(rustc --version), "\d+\.\d+\.\d+").Value
|
||||
return $rustVersion
|
||||
}
|
||||
@@ -349,4 +356,3 @@ function Build-PackageManagementEnvironmentTable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user