我在TFS构建的一个步骤中使用curl。该步骤生成一个cUrl命令,以将一些文件上载到ftp位置。
我将命令简化为最简单的示例,该示例提供了相同的问题:
curl --stderr - -T {"helloworld.txt","helloworld2.txt"} ftp://10.32.4.2/CI/Workspace/
上面写着:
curl:(6)无法解析主机“helloworld2.txt”
而
curl --stderr - -T "helloworld.txt" ftp://10.32.4.2/CI/Workspace/
如预期的那样,将文件上载到ftp位置。
发布于 2016-08-03 00:16:38
在代理上找到cURLUploader.ps1
脚本。它是在$agentPath\tasks\cURLUploader\1.0.0\下
将第54项改为
$uploadFiles = '{"' + [System.String]::Join('","', $foundFiles) + '"}'
至
$uploadFiles = '"{' + [System.String]::Join(',', $foundFiles) + '}"'
我把它作为一个bug提交:https://github.com/Microsoft/vsts-tasks/issues/2202
https://stackoverflow.com/questions/38736933
复制相似问题