Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use $LASTEXITCODE instead of $result when building an error message #26

Open
kfrajtak opened this issue Dec 15, 2016 · 0 comments
Open
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@kfrajtak
Copy link

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

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants