Closed Szeraax closed 2 years ago
I would be more than happy to accept your PR. Probably all my projects suffer from similar problems.
As for testing, you can always do Unprotect-PGP -ErrorAction Stop
and the warnings are changed into the throw. It's a decision i did some time ago that by default you go by warnings, and if you want to have control over the process yourself you use ErrorAction Stop.
When I run the parameters -FilePath or -OutputFilePath with home dir shortcut, I get the following errors:
Not using resolve-path probably applies to other param sets, haven't tried them. Feel free to close as WONTFIX and comment here that relative paths can't use aliases or need to be absolute paths. Or I can submit a PR in a little bit.
Additionally, these fatal errors do not result in red test and error, so the only way to test if the command succeeded is to do a test-path on the expected output path. Would recommend a throw anytime decryption is stopped or at least a -Passthru param that will ONLY produce pipeline output on successful decryption.