This commit is contained in:
Benjamin Toby
2025-05-29 11:29:29 +01:00
parent accf486151
commit 68c1074de1
9 changed files with 25 additions and 6 deletions
+8 -1
View File
@@ -116,9 +116,15 @@ function sync({ options, dirs, dirPath, init }: SyncFoldersSyncFnParams) {
cmdArray.push("--delete");
}
if (options?.include?.[0]) {
options.include.forEach((excl) => {
cmdArray.push(`--include='${excl}'`);
});
}
if (options?.exclude?.[0]) {
options.exclude.forEach((excl) => {
cmdArray.push(`--exclude '${excl}'`);
cmdArray.push(`--exclude='${excl}'`);
});
}
@@ -138,6 +144,7 @@ function sync({ options, dirs, dirPath, init }: SyncFoldersSyncFnParams) {
path.normalize(dstDr) + "/"
);
const cmd = cmdArray.join(" ");
execSync(cmd, {
stdio: "inherit",
});