Skip to content

Commit

Permalink
there should just be one item found if there were no errors
Browse files Browse the repository at this point in the history
  • Loading branch information
moswald committed Jun 20, 2019
1 parent 4759be9 commit 950154a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tasks/DeleteFilesV1/deletefiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ tl.setResourcePath(path.join(__dirname, 'task.json'));
if (removeSourceFolder && !errorHappened) {
foundPaths = tl.find(sourceFolder);

if (foundPaths.every(x => tl.stats(x).isDirectory())) {
if (foundPaths.length === 1) {
try {
tl.rmRF(sourceFolder);
}
Expand Down

0 comments on commit 950154a

Please sign in to comment.