forked from OCram85/PSCredentialStore
Increase code coverage (#22)
This commit is contained in:
@ -32,6 +32,7 @@ function Get-RandomKey {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[ValidateSet(16, 24, 32)]
|
||||
[string]$size
|
||||
)
|
||||
|
@ -83,14 +83,14 @@ Could not find the required {0} called {1}. Please install the required {0} to r
|
||||
}
|
||||
|
||||
'PSSnapin' {
|
||||
if (Get-PSSnapin -Name $Name -Registered) {
|
||||
if (Get-PSSnapin -Name $Name -Registered -ErrorAction SilentlyContinue) {
|
||||
return $true
|
||||
}
|
||||
else {
|
||||
if ($StopIfFails) {
|
||||
Write-Error -Message $Message -ErrorAction Stop -Category NotInstalled
|
||||
return $false
|
||||
}
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user