7Zip4Powershell icon indicating copy to clipboard operation
7Zip4Powershell copied to clipboard

ErrorAction Parameter for Get-7Zip and Get-7ZipInformation

Open JasonFossen opened this issue 8 years ago • 1 comments

Hello:

When attempting to open an encrypted archive with the wrong password, an exception is correctly thrown, but the -ErrorAction parameter appears to not be respected. For example:

Get-7Zip -ArchiveFileName .\Encrypted.7z -Password "WrongPassword" -ErrorAction SilentlyContinue

Is not silent. And "-ErrorAction Stop" does not stop.

Both Get-7Zip and Get-7ZipInformation appear to not respect -ErrorAction, but Expand-7Zip does (haven't tried the other cmdlets).

Thanks for the module! Cheers, J.

JasonFossen avatar Jun 22 '16 11:06 JasonFossen

Up to now I didn't implement any error handling at all. I'll have a closer look.

thoemmi avatar Jun 23 '16 22:06 thoemmi