File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,18 @@ steps:
57
57
inputs :
58
58
targetType : inline
59
59
pwsh : true
60
+ errorActionPreference : ' continue'
60
61
script : |
61
62
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Continue
62
63
Get-PSRepository
63
64
$patToken = '$(NUGETFEEDKEY)' | ConvertTo-SecureString -AsPlainText -Force
64
65
$nugetFeed = '$(NUGETFEED)'
65
66
$user = '$(NUGETBUILDUSER)'
66
67
$credsAzureDevopsServices = New-Object System.Management.Automation.PSCredential($user, $patToken)
67
- Register-PackageSource -Name 'LocalNugetPackageSource' -Location $nugetFeed -SkipValidate -Trusted -Verbose -ProviderName 'Nuget'
68
- Register-PSRepository -Name 'LocalNugetFeed' -SourceLocation $nugetFeed -PublishLocation $nugetFeed -InstallationPolicy Trusted -Credential $credsAzureDevopsServices -PackageManagementProvider 'Nuget'
68
+ UnRegister-PackageSource -Name 'LocalNugetPackageSource' -ErrorAction Continue
69
+ UnRegister-PSRepository -Name 'LocalNugetFeed' -ErrorAction Continue
70
+ Register-PackageSource -Name 'LocalNugetPackageSource' -Location $nugetFeed -SkipValidate -Trusted -Verbose -ProviderName 'Nuget' -ErrorAction Continue
71
+ Register-PSRepository -Name 'LocalNugetFeed' -SourceLocation $nugetFeed -PublishLocation $nugetFeed -InstallationPolicy Trusted -Credential $credsAzureDevopsServices -PackageManagementProvider 'Nuget' -ErrorAction Continue
69
72
Get-PSRepository
70
73
Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Credential $credsAzureDevopsServices -AllVersions -Repository 'LocalNugetFeed'
71
- Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Repository 'LocalNugetFeed'
74
+ Find-Module -Name Microsoft.Graph.Authentication -AllowPrerelease -Repository 'LocalNugetFeed'
You can’t perform that action at this time.
0 commit comments