TF Merge command in Powershell script task is not working

蓝咒 提交于 2021-02-11 15:56:23

问题


I am having powershell task with the following commands in my pipeline which is running using custom agent pool.

$TFFile = "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe"

$mergeCommand = " merge $/MyProject/dev $/MyProject/test /recursive"

Start-Process "$TFFile" "$mergeCommand"

$comment = "Automated merge check-in"

$CheckinToTarget = " checkin $/MyProject/test /comment:$comment /recursive /noprompt"

Start-Process "$TFFile" "$CheckinToTarget"

The pipeline is successfully running. But the changes in source branch is not merged with target branch. Please let me know what is missing in this scripts.


回答1:


I am posting this solution to help others who are facing the issue like me. Using /loginType:OAuth with the command solves my issues.



来源:https://stackoverflow.com/questions/60448133/tf-merge-command-in-powershell-script-task-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!