Add a function for checking NuGet packages

This commit is contained in:
Manuel Thalmann 2024-08-07 03:23:59 +02:00
parent 6dde1d3603
commit 8ae54f48e8

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);
}