TylerLeonhardt / SecretManagement.LastPass

A PowerShell SecretManagement extension for LastPass
MIT License
46 stars 9 forks source link

Get-Secret produce - The secret was not found with a valid secret when logged out. #20

Closed itfranck closed 3 years ago

itfranck commented 3 years ago

Prompt behavior but $res is $null and our custom error message is ignored

$res = Invoke-lpass 'show', '--name', $Name, '--all' -ErrorAction SilentlyContinue

No prompt behavior but we get the ErrorRecord and can deal with custom error.

$res = Invoke-lpass 'show', '--name', $Name, '--all' 

We need to keep prompt behavior (asking for password) along with custom message to indicate the user is logged out.

I have a very clear idea how to fix it, I'll submit a PR shortly for that.

itfranck commented 3 years ago

https://github.com/TylerLeonhardt/SecretManagement.LastPass/pull/21