mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat: custom include patterns (#104)
* feat: add custom include patterns * feat: add exclude-if-present option
This commit is contained in:
committed by
Nicolas Meienberger
parent
2c11b7c7de
commit
6b6338291b
@@ -235,6 +235,7 @@ const backup = async (
|
||||
source: string,
|
||||
options?: {
|
||||
exclude?: string[];
|
||||
excludeIfPresent?: string[];
|
||||
include?: string[];
|
||||
tags?: string[];
|
||||
compressionMode?: CompressionMode;
|
||||
@@ -280,6 +281,12 @@ const backup = async (
|
||||
}
|
||||
}
|
||||
|
||||
if (options?.excludeIfPresent && options.excludeIfPresent.length > 0) {
|
||||
for (const filename of options.excludeIfPresent) {
|
||||
args.push("--exclude-if-present", filename);
|
||||
}
|
||||
}
|
||||
|
||||
addCommonArgs(args, env);
|
||||
|
||||
const logData = throttle((data: string) => {
|
||||
|
||||
Reference in New Issue
Block a user