File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11function Install-NugetPackage {
22 # This function acts similarly to Install-Package -SkipDependencies and downloads nuget packages from nuget.org
3- [CmdletBinding (SupportsShouldProcess = $true , ConfirmImpact = ' High' )]
3+ [CmdletBinding (SupportsShouldProcess , ConfirmImpact = ' High' )]
44 Param (
55 [string ]$Name ,
66 [string ]$MinimumVersion ,
@@ -61,7 +61,7 @@ function Install-NugetPackage {
6161
6262 $selectedVersion = $versionList | Select-Object - Last 1
6363 if (-Not $selectedVersion ) {
64- Stop-PSFFunction - Message " Version could not be found using current parameters " - EnableException $true
64+ Stop-PSFFunction - Message " Required version could not be found among a total of $ ( $versionList .Count ) versions " - EnableException $true
6565 }
6666
6767 # download and extract the files
@@ -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 ([string ]$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