remove terminating error

This commit is contained in:
OCram85 2022-07-19 11:12:36 +02:00
parent ae62cccfaa
commit cff5b6f04a

View File

@ -7,6 +7,10 @@ function Test-CredentialStoreItem {
Use this cmdlet for basic checks with a single item. Check the item first with this function before
you try to interact with it.
Breaking Change for `v1.1.0+`:
Test-CredentialStoreItem will return `$false` even if the store doesn't exist. We removed the terminating
error and replaced it with a warning message.
.PARAMETER Path
Define a custom credential store you try to read from. Without the `-Path` parameter
`Test-CredentialStoreItem` tries to read from the default private store.
@ -88,10 +92,10 @@ function Test-CredentialStoreItem {
}
else {
$MsgParams = @{
ErrorAction = 'Stop'
Message = "The given credential store ({0}) does not exist!" -f $Path
Message = "The given credential store ({0}) does not exist!" -f $Path
}
Write-Error @MsgParams
Write-Warning @MsgParams
return $false
}
}