Skip to content

Commit c8b6eb9

Browse files
committed
trying to please ps5
1 parent e09f331 commit c8b6eb9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/functions/Install-NugetPackage.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function 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

0 commit comments

Comments
 (0)