Chris Whisenhunt
Chris Whisenhunt

Reputation: 351

VSO copy to task is failing for unknown reason

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. :)

enter image description here 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?

Upvotes: 0

Views: 2537

Answers (1)

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29976

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.enter image description here

Upvotes: 0

Related Questions