-
Notifications
You must be signed in to change notification settings - Fork 14
Use $LASTEXITCODE instead of $result when building an error message #26
Copy link
Copy link
Open
Labels
bugThe issue is a bug.The issue is a bug.help wantedThe issue is up for grabs for anyone in the community.The issue is up for grabs for anyone in the community.
Description
Hi,
I ran into a problem when using your DSC resource.
The message was
VERBOSE: [2016-12-15T12:15:50] [ERROR] PowerShell DSC resource MSFT_xRobocopy
failed to execute Test-TargetResource functionality with error message:
robocopy returned with errors! Exit code: ! More info
here:https://support.microsoft.com/en-us/kb/954404
I believe there should $LASTEXITCODE variable used instead of $result (which was not initialized and is undefined at this point) when building error message on the line 200:
throw "robocopy returned with errors! Exit code: $result! More info here:https://support.microsoft.com/en-us/kb/954404"
Thanks,
Karel
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThe issue is a bug.The issue is a bug.help wantedThe issue is up for grabs for anyone in the community.The issue is up for grabs for anyone in the community.