DeleteFilesV1 patterns don't find files/folders starting with a dot
See original GitHub issueEnvironment
- Server - Azure Pipelines
- Agent - Private
- Windows Server 2016 x64 with Agent 2.144.2
Issue Description
The task DeleteFilesV1 doesn’t find files or folders starting with a dot with its patterns. This differs from CopyFilesV2, which does copy files/folders starting with a dot. So if you use the same pattern in both a copy and a delete task, not all copied files will be deleted.
The problem is here: https://github.com/Microsoft/azure-pipelines-tasks/blob/master/Tasks/DeleteFilesV1/deletefiles.ts#L59-L65
Custom matchOptions
are passed, but dot: true
is not set.
Compare to https://github.com/Microsoft/azure-pipelines-task-lib/blob/master/node/task.ts#L1413-L1426 where this and many other options are set by default, but not used for DeleteFilesV1 because custom options are passed.
Task logs
Nothing interesting here
2019-01-30T15:04:12.6948075Z ##[section]Starting: Delete archived source
2019-01-30T15:04:12.6952288Z ==============================================================================
2019-01-30T15:04:12.6952378Z Task : Delete Files
2019-01-30T15:04:12.6952431Z Description : Delete files or folders. (The minimatch patterns will only match file paths, not folder paths)
2019-01-30T15:04:12.6952484Z Version : 1.1.6
2019-01-30T15:04:12.6952552Z Author : Microsoft Corporation
2019-01-30T15:04:12.6952604Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=722333)
2019-01-30T15:04:12.6952929Z ==============================================================================
2019-01-30T15:04:16.4039069Z ##[section]Finishing: Delete archived source
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
DeleteFiles@1 - Delete files v1 task - Microsoft Learn
Use this task to delete files or folders from the agent working directory. Examples. Delete several patterns. This example will delete some/file ......
Read more >How to delete all files in a current directory starting with a dot?
Every directory contains a file called . which refers to the ... This will delete all files starting with a dot containing at...
Read more >How to delete a folder that name ended with a dot (".")?
Navigate File Explorer to location where problematic folder is located. Context menu (right mouse button) > Git Bash Here. rm -rf Foldername./.
Read more >How do I remove all files that match a pattern? - Ask Ubuntu
Use the find command (with care!) find . -name '*.orig' #-delete. I've commented out the delete command but once you're happy with what...
Read more >Find Files Faster: How to Organize Files and Folders - Zapier
Nested folders generally make it easier to find specific files later, because you don't have to sift through all your files at once....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@anatolybolshakov Sounds like a task issue. Could you please investigate?
Let me close it at the moment since it’s resolved - please let us know if you have any further questions!