curl was not found in the path Visual Studio Team Services

◇◆丶佛笑我妖孽 提交于 2019-12-04 03:58:24

问题


I'm using the Hosted Agent for release management in Visual Studio Team Services. I have a cURL Upload Files task on my release definition which was working last week and I've had several successful deployments over the past weeks.

Today I created a new release from the same release definition and I am receiving the following error on the cURL Upload Files task.

2016-03-31T08:56:43.4253012Z ##[debug]curl=null
2016-03-31T08:56:43.4263027Z ##[error]curl was not found in the path.
2016-03-31T08:56:43.4303022Z ##[debug]task result: Failed
2016-03-31T08:56:43.4313025Z Return code: 1

I have checked the System Capabilities on the Hosted Agent and it lists curl C:\Program Files (x86)\Git\bin\curl.exe as one of them.

Any one have any ideas why this has suddenly started failing?


回答1:


First, sorry about this. I'm with the product team and we’ve confirmed this is a regression on our side. cURL is still on the box but it is no longer in the path. We’re working on getting this fixed on our end but it’ll likely take a day or two. In the meantime, we’d recommend doing the following:

  1. Before your curl task, create a new powershell task
  2. Change the type of the task to be an “Inline Script”
  3. Change the Inline Script input to be the following:

echo "##vso[task.setvariable variable=PATH;]$env:PATH;C:\Program Files\Git\usr\bin"

  1. Save and queue a new build.

UPDATE: We've fixed this issue now. The workaround should be no longer necessary.



来源:https://stackoverflow.com/questions/36329107/curl-was-not-found-in-the-path-visual-studio-team-services

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