我在TFS构建中设置了一个命令行阶段来执行Robocopy,但它返回错误代码1,尽管在robocopy执行期间没有错误。
如果我直接在Cmd中运行Robocopy命令,则可以正常工作,并且作业日志显示Robocopy在结束之前正常工作:
2019-02-27T10:21:58.3234459Z Total Copied Skipped
Mismatch FAILED Extras
2019-02-27T10:21:58.3234459Z Dirs : 1688 0 1688 0 0 0
2019-02-27T10:21:58.3234459Z Files : 6107 6 6101 0 0 0
2019-02-27T10:21:58.3234459Z Bytes : 246.01 m 299.2 k 245.71 m 0 0 0
2019-02-27T10:21:58.3234459Z Times : 0:00:17 0:00:00 0:00:00 0:00:17
2019-02-27T10:21:58.3234459Z
2019-02-27T10:21:58.3234459Z
2019-02-27T10:21:58.3234459Z Speed : 3879329 Bytes/sec.
2019-02-27T10:21:58.3234459Z Speed : 221.976 MegaBytes/min.
2019-02-27T10:21:58.3234459Z
2019-02-27T10:21:58.3234459Z Ended : Wed Feb 27 11:21:58 2019
2019-02-27T10:21:58.3702460Z ##[error]Process completed with exit code 1.