mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +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 {
|
function Get-OSName {
|
||||||
return (Get-CimInstance -ClassName Win32_OperatingSystem).Caption
|
return (Get-CimInstance -ClassName Win32_OperatingSystem).Caption
|
||||||
}
|
}
|
||||||
@@ -14,6 +20,7 @@ function Get-BashVersion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-RustVersion {
|
function Get-RustVersion {
|
||||||
|
Initialize-RustEnvironment
|
||||||
$rustVersion = [regex]::matches($(rustc --version), "\d+\.\d+\.\d+").Value
|
$rustVersion = [regex]::matches($(rustc --version), "\d+\.\d+\.\d+").Value
|
||||||
return $rustVersion
|
return $rustVersion
|
||||||
}
|
}
|
||||||
@@ -349,4 +356,3 @@ function Build-PackageManagementEnvironmentTable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user