mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 22:26:56 +00:00
[Windows] Pin MongoDB to the specific version defined in the toolset (#4418)
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
## Desc: Install MongoDB
|
||||
####################################################################################
|
||||
|
||||
Choco-Install -PackageName mongodb
|
||||
$toolsetVersion = (Get-ToolsetContent).mongodb.version
|
||||
$latestChocoPackage = Get-LatestChocoPackageVersion -TargetVersion $toolsetVersion -PackageName "mongodb"
|
||||
Choco-Install -PackageName mongodb -ArgumentList "--version $latestChocoPackage"
|
||||
$mongoPath = (Get-CimInstance Win32_Service -Filter "Name LIKE 'mongodb'").PathName
|
||||
$mongoBin = Split-Path -Path $mongoPath.split('"')[1]
|
||||
Add-MachinePathItem "$mongoBin"
|
||||
|
||||
Reference in New Issue
Block a user