File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,20 @@ jobs:
3434 dotnet tool install powershell --version 7.4.*
3535 displayName: Install PowerShell 7.4.x
3636
37+ - pwsh : |
38+ if (-not (Get-PackageProvider -Name NuGet -ErrorAction SilentlyContinue)) {
39+ Install-PackageProvider -Name NuGet -Force
40+ }
41+ Install-Package -Name YamlDotNet -RequiredVersion $(YamlDotNetVersion) -ProviderName NuGet -Force -ErrorAction Stop
42+ displayName: Install YamlDotNet NuGet Package
43+ retryCountOnTaskFailure: 5
44+
3745 - pwsh : |
3846 dotnet tool run pwsh -NoLogo -NoProfile -NonInteractive -File ./tools/Github/ParseServiceContactsList.ps1 -AccessToken $env:SYSTEM_ACCESSTOKEN
3947 env:
4048 SYSTEM_ACCESSTOKEN: $(System.AccessToken)
4149 displayName: Update resourceManagement.yml file locally
50+ condition: succeeded()
4251
4352 - pwsh : |
4453 $hasChanges = git diff --name-only .github/policies
Original file line number Diff line number Diff line change @@ -26,11 +26,6 @@ function InitializeRequiredPackages {
2626 [CmdletBinding ()]
2727 param ()
2828
29- if (-not (Get-PackageProvider - Name NuGet - ErrorAction SilentlyContinue)) {
30- Install-PackageProvider - Name NuGet - Force
31- }
32-
33- Install-Package - Name YamlDotNet - RequiredVersion ${env: YamlDotNetVersion} - ProviderName NuGet - Force
3429 $pkgYaml = Get-Package - Name YamlDotNet | Select-Object - ExpandProperty Source | Split-Path
3530 $dllYaml = Join-Path - Path $pkgYaml - ChildPath " lib" | Join-Path - ChildPath " netstandard2.0" | Join-Path - ChildPath " YamlDotNet.dll"
3631 Add-Type - LiteralPath $dllYaml
You can’t perform that action at this time.
0 commit comments