lib/poshy-ecks.0.5.1/lib/poshy-env-var.0.5.0/lib/poshy-lucidity.0.3.2/src/Test-Command.ps1
#!/usr/bin/env pwsh $ErrorActionPreference = "Stop" Set-StrictMode -Version Latest function Test-Command() { param( [Parameter(Mandatory = $true)] [string[]] $Name, [Parameter(Mandatory = $false)] [switch] $ExecutableOnly ) if (-not $ExecutableOnly) { return ($null -ne (Get-Command -ErrorAction SilentlyContinue $Name)) } else { $command_types = @("Application", "ExternalScript") return ($null -ne (Get-Command -ErrorAction SilentlyContinue $Name -CommandType $command_types)) } } |