Add a function for checking NuGet packages

This commit is contained in:
Manuel Thalmann 2024-08-07 03:23:59 +02:00
parent 6900cf65e2
commit 3876ca99e0

View file

@ -57,3 +57,18 @@ function Test-Command {
[bool] (Get-Command $Name -ErrorAction SilentlyContinue);
}
<#
.SYNOPSIS
Checks whether a package with the specified name is installed.
.PARAMETER Name
The name of the package to check.
#>
function Test-PSPackage {
param(
[string] $Name
)
[bool] (Get-Package $Name -ErrorAction SilentlyContinue);
}