File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ function Install-NugetPackage {
1515 $packageLowerName = $Name.ToLower ()
1616 $Api = $Api.TrimEnd (' /' )
1717 # Get API endpoint URLs
18- $index = Invoke-WebRequest " $Api /index.json" - ErrorAction Stop - WhatIf: $false
18+ $index = Invoke-WebRequest " $Api /index.json" - ErrorAction Stop
1919 $indexObject = $index.Content | ConvertFrom-Json
2020
2121 # search for package
2222 $searchUrl = $indexObject.resources | Where-Object { $_ .' @type' -eq ' SearchQueryService' } | Select-Object - First 1
2323 $query = " ?q=PackageId:{0}&prerelease={1}" -f $Name , (-Not $SkipPreRelease ).ToString().ToLower()
24- $packageInfoResponse = Invoke-WebRequest - Uri " $ ( $searchUrl .' @id' ) $query " - ErrorAction Stop - WhatIf: $false
24+ $packageInfoResponse = Invoke-WebRequest - Uri " $ ( $searchUrl .' @id' ) $query " - ErrorAction Stop
2525 $packageInfoObject = $packageInfoResponse.Content | ConvertFrom-Json
2626 $packageInfo = $packageInfoObject.data | Select-Object - First 1
2727 if (-Not $packageInfo ) {
@@ -84,7 +84,7 @@ function Install-NugetPackage {
8484 }
8585 $path = Join-PSFPath $scopePath " $packageName .$selectedVersion "
8686 $packagePath = Join-PSFPath $path $fileName
87- if ($PSCmdlet.ShouldProcess ($fileName , " Download package " )) {
87+ if ($PSCmdlet.ShouldProcess ([ string ] $fileName )) {
8888 if (Test-Path $path ) {
8989 if ($Force ) {
9090 Remove-Item $path - Recurse - Force
You can’t perform that action at this time.
0 commit comments