VSO copy to task is failing for unknown reason

百般思念 提交于 2021-01-29 08:21:05

问题


I have a visual studio team services build setup. I have 2 steps so far.

Visual Studio Build - this works beautifully Copy files - this works depending on where I set the target path too.

Now I need the outputted files to be deployed to our application. There are multiple tasks to use: copy files, copy and publish build artifacts, publish build artifacts, etc.

I decided on copy files because it seemed the most straight forward, and after all, I just need to copy files. :)

My issue is that if I change the target folder to E:\test\ it copies everything wonderfully. However with the target folder set to the application path: E:\Program Files\App\CI I get the following error message:

******************************************************************************
Starting task: Copy Files to: E:\Program Files\App\CI
******************************************************************************
Set workingFolder to default: E:\build\agent\tasks\CopyFiles\1.0.9
found 65 files
shell.js: internal error
Error: ENOENT, no such file or directory 'E:\build\agent\tasks\CopyFiles\1.0.9\"E:'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:747:18)
    at mkdirSyncRecursive (E:\build\agent\tasks\CopyFiles\1.0.9\node_modules\shelljs\src\mkdir.js:11:8)
    at mkdirSyncRecursive (E:\build\agent\tasks\CopyFiles\1.0.9\node_modules\shelljs\src\mkdir.js:16:3)
    at mkdirSyncRecursive (E:\build\agent\tasks\CopyFiles\1.0.9\node_modules\shelljs\src\mkdir.js:16:3)
    at mkdirSyncRecursive (E:\build\agent\tasks\CopyFiles\1.0.9\node_modules\shelljs\src\mkdir.js:16:3)
    at mkdirSyncRecursive (E:\build\agent\tasks\CopyFiles\1.0.9\node_modules\shelljs\src\mkdir.js:16:3)
    at E:\build\agent\tasks\CopyFiles\1.0.9\node_modules\shelljs\src\mkdir.js:63:7
    at Array.forEach (native)
    at Object._mkdir (E:\build\agent\tasks\CopyFiles\1.0.9\node_modules\shelljs\src\mkdir.js:48:8)
******************************************************************************
Finishing task: CopyFiles
******************************************************************************
System.Exception: Task CopyFiles failed. This caused the job to fail. Look at the logs for the task for more details.
at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.Run(IJobContext jobContext, IJobRequest job, IJobExtension jobExtension, CancellationTokenSource tokenSource)
Worker Worker-56b6a6c0-8c1d-4dc3-b200-385e5c7a7625 finished running job 56b6a6c0-8c1d-4dc3-b200-385e5c7a7625

In the error it says:

Error: ENOENT, no such file or directory 'E:\build\agent\tasks\CopyFiles\1.0.9\"E:'

The trailing "E: jumps out at me, but am not sure why it's doing that. Any thoughts on this?


回答1:


The last time I see this issue with "Copy Files" task is that I entered a redundant blank space at the begin of the Target Folder path. I just tried it again and can still get the same error with the blank space enter. So you may need to check this and then try build again.



来源:https://stackoverflow.com/questions/34931831/vso-copy-to-task-is-failing-for-unknown-reason

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