xRobocopy icon indicating copy to clipboard operation
xRobocopy copied to clipboard

Robocopy error code not included when failing during test

Open magnustomte opened this issue 9 years ago • 1 comments

The following snippet in Test-TargetResource:

    else
    {
        throw "robocopy returned with errors! Exit code: $result! More info here:https://support.microsoft.com/en-us/kb/954404"
    }

Should be:

    else
    {
        throw "robocopy returned with errors! Exit code: $LASTEXITCODE! More info here:https://support.microsoft.com/en-us/kb/954404"
    }

as it is in the Set-TargetResource.

magnustomte avatar Jul 05 '16 21:07 magnustomte

@magnustomte good spot thanks. Adding this fix to #23

Arturas-K avatar Aug 04 '16 21:08 Arturas-K