Add a function for checking NuGet packages
This commit is contained in:
parent
0be3410151
commit
0b28364280
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue