Add a function for checking NuGet packages

This commit is contained in:
Manuel Thalmann 2024-08-07 03:23:59 +02:00
parent 0be3410151
commit 0b28364280

View file

@ -56,3 +56,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);
}