Skip to content

Commit

Permalink
fix: recursively delete files in TARGET_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
s0 committed Nov 17, 2022
1 parent f42367b commit ac9c405
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ everything, and you will need to specify exactly what needs to be deleted.**
1. Default behaviour with a custom target directory:

```
target_dir/*
target_dir/**/*
!.git
```

Expand Down
3 changes: 1 addition & 2 deletions action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ function copyFile(srcFile, destFile, force) {
}
//# sourceMappingURL=io.js.map


/***/ }),

/***/ 2:
Expand Down Expand Up @@ -12283,7 +12282,7 @@ const main = async ({ env = process.env, log, }) => {
}
else if (env.TARGET_DIR) {
log.log(`##[info] Removing all files from target dir ${env.TARGET_DIR} on target branch`);
return [`${env.TARGET_DIR}/*`, '!.git'];
return [`${env.TARGET_DIR}/**/*`, '!.git'];
}
else {
// Remove all files
Expand Down
2 changes: 1 addition & 1 deletion action/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ export const main = async ({
log.log(
`##[info] Removing all files from target dir ${env.TARGET_DIR} on target branch`
);
return [`${env.TARGET_DIR}/*`, '!.git'];
return [`${env.TARGET_DIR}/**/*`, '!.git'];
} else {
// Remove all files
log.log(`##[info] Removing all files from target branch`);
Expand Down

0 comments on commit ac9c405

Please sign in to comment.