i like to fail the task if no files are matched. from reading the documents
i can see its behavior is exactly the opposite.
here is my download and copy task, how when its 0 files to throw error and to fail the pipeline
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'Artifacts'
itemPattern: |
**/*.a
**/*s.plist*
downloadPath: '$(System.ArtifactsDirectory)'
- task: CopyFiles@2
inputs:
SourceFolder: '$(System.ArtifactsDirectory)'
Contents: |
**/*.a
**/*s.plist*
TargetFolder: '$(Agent.HomeDirectory)/../${{parameters.FolderCompile}}'