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:
34
34
dotnet tool install powershell --version 7.4.*
35
35
displayName: Install PowerShell 7.4.x
36
36
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
+
37
45
- pwsh : |
38
46
dotnet tool run pwsh -NoLogo -NoProfile -NonInteractive -File ./tools/Github/ParseServiceContactsList.ps1 -AccessToken $env:SYSTEM_ACCESSTOKEN
39
47
env:
40
48
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
41
49
displayName: Update resourceManagement.yml file locally
50
+ condition: succeeded()
42
51
43
52
- pwsh : |
44
53
$hasChanges = git diff --name-only .github/policies
Original file line number Diff line number Diff line change @@ -26,11 +26,6 @@ function InitializeRequiredPackages {
26
26
[CmdletBinding ()]
27
27
param ()
28
28
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
34
29
$pkgYaml = Get-Package - Name YamlDotNet | Select-Object - ExpandProperty Source | Split-Path
35
30
$dllYaml = Join-Path - Path $pkgYaml - ChildPath " lib" | Join-Path - ChildPath " netstandard2.0" | Join-Path - ChildPath " YamlDotNet.dll"
36
31
Add-Type - LiteralPath $dllYaml
You can’t perform that action at this time.
0 commit comments