This repository was archived by the owner on Jun 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
src/PowerShellGet/private/functions Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,11 @@ Describe 'Managing repositories' -Tag BVT {
263263 $warning | Should BeLike " *Unable to reach URL*"
264264 }
265265
266+ It " Should let you update a package source but produce a warning" {
267+ Register-PackageSource NewRepo - Location https:// microsoft.com / api/ v2 - ProviderName powershellget - WarningAction SilentlyContinue
268+ Set-PackageSource - Name NewRepo - Location https:// microsoft.com / api/ v2 - NewLocation https:// docs.microsoft.com / api/ v2 - ProviderName powershellget - WarningVariable warning - WarningAction SilentlyContinue
269+ $warning | Should BeLike " *Unable to reach URL 'https://docs*"
270+ }
266271
267272 It " Should not let you register 2 repositories which differ only by /" {
268273 Register-PSRepository - Name NewRepo - SourceLocation " https://nowhere.com/api/v2" - WarningAction SilentlyContinue
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ function Get-ValidModuleLocation
5858 - Proxy $Proxy `
5959 - ProxyCredential $ProxyCredential `
6060 - ErrorAction SilentlyContinue `
61- - SkipLocationWarning
61+ - SkipLocationWarning
6262 if ($tempLocation )
6363 {
6464 return $tempLocation
@@ -73,8 +73,7 @@ function Get-ValidModuleLocation
7373 - Credential $Credential `
7474 - Proxy $Proxy `
7575 - ProxyCredential $ProxyCredential `
76- - CallerPSCmdlet $PSCmdlet `
77- - SkipLocationWarning
76+ - CallerPSCmdlet $PSCmdlet
7877 }
7978
8079 return $LocationString
You can’t perform that action at this time.
0 commit comments