Visual Studio Online Build 将 git 输出视为错误 [英] Visual Studio Online Build treats git output as errors

查看:16
本文介绍了Visual Studio Online Build 将 git 输出视为错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio Online 中的构建尝试通过

解决方案

Git 将其内容输出到 Visual Studio Team Services 解释为错误的错误流.

您需要像这样在脚本中重定向 Gits 输出以使其正常工作:

git pull 2>&1 |写主机

My build in Visual Studio Online tries to deploy my Azure web site via Kudu. The script works fine, and deployment goes through, but VSO treats git output as errors for some reason, and declares the whole build failed. Take a look at the screenshot below.

Some details:

  1. This is a "new scripted" build, not a XAML-defined one.
  2. Build definition has just one step, which executes a PowerShell script, which runs F# FAKE (not sure if this is relevant).
  3. When I run the same script on my local machine, I don't see any "strange" output, including the [K at the end of each line.
  4. After running on my local, $LastExitCode is zero.
  5. I very much would like to keep the build to one step, so I can continue leveraging the power of FAKE.

解决方案

Git outputs its content to the error stream which Visual Studio Team Services interprets as error.

You need to redirect Gits output in your script like this to make it working:

git pull 2>&1 | Write-Host

这篇关于Visual Studio Online Build 将 git 输出视为错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆