Reputation: 1987
In my build I need to occasionally copy a folder. i.e. If the folder's not there it's not a fail.
Currently I've used the copy task with "Continue on error" set which makes it look like my build has only partially succeeded.
I've also tried the "Command Line" task with robocopy/xcopy specified thus:
xcopy c:\here\ c:\there\ 2>NUL
Any tips on how I can fix this? e.g. inline powershell might do.
Upvotes: 0
Views: 46
Reputation: 51143
There is no way to change Partially Succeeded build to Succeeded status for now.
Instead of using the built-in Copy-File task. You could create your own task and overwrite the error info by yourself. How to create your own extension as your demands please follow this tutorial.
It's able to use Logging Commands to Log error or warning issue to timeline record of task.
Upvotes: 1