dsccommunity / xRobocopy

DSC Module to automate Robocopy transfers
MIT License
54 stars 15 forks source link

Robocopy error code not included when failing during test #24

Open magnustomte opened 8 years ago

magnustomte commented 8 years ago

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.

Arturas-K commented 8 years ago

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