Skip to content

[Request] Add option to clear $global:LastExitCode on success #22

@skaravos

Description

@skaravos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions