Hey, I was just wondering if you think it might be a good idea to add a parameter -ClearLastExitCodeOnSuccess that would reset the $global:LastExitCode back to zero when the Robocopy operation "succeeded".
The logic is already implemented in the parser to set the Success property of the returned object, so it wouldn't be a difficult thing to check at the end of the Invoke-Robocopy operation.
I'll start working on a basic implementation of it, you can review the PR and decide whether it's a good idea or not.
Hey, I was just wondering if you think it might be a good idea to add a parameter
-ClearLastExitCodeOnSuccess
that would reset the$global:LastExitCode
back to zero when the Robocopy operation "succeeded".The logic is already implemented in the parser to set the
Success
property of the returned object, so it wouldn't be a difficult thing to check at the end of the Invoke-Robocopy operation.I'll start working on a basic implementation of it, you can review the PR and decide whether it's a good idea or not.