We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 400625e commit 387b1c5Copy full SHA for 387b1c5
2 files changed
.changeset/brave-mugs-drive.md
@@ -0,0 +1,2 @@
1
+---
2
lib/src/utils.ts
@@ -56,12 +56,18 @@ export const listMatchingFiles = async ({
56
debug,
57
backupDir = DEFAULT_BACKUP_DIR,
58
}: CollectFilesOptions): Promise<FileEntry[]> => {
59
+ // delete backupDir during initialization
60
+ try {
61
+ await fs.rm(backupDir, { recursive: true, force: true });
62
+ } catch {
63
+ // ignore
64
+ }
65
for (const p of [...include, ...exclude]) {
66
if (p.startsWith("!")) throw new Error(`Negation not allowed in include/exclude: ${p}`);
67
if (p.includes("\\")) console.warn(`Use '/' as path separator: ${p}`);
68
}
69
- exclude.push(backupDir);
70
+ exclude.push(`${backupDir}/**`);
71
72
const fileMatcher = (filepath: string) => {
73
const posixPath = filepath.replace(/\\/g, "/");
0 commit comments