mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
feat: No pemissions for the rsync (#2187)
* feat: No pemissions for the rsync * chore: Fix the build for missing a property
This commit is contained in:
@@ -21,6 +21,8 @@ pub struct RsyncOptions {
|
||||
pub ignore_existing: bool,
|
||||
#[serde(default)]
|
||||
pub exclude: Vec<String>,
|
||||
#[serde(default = "const_true")]
|
||||
pub no_permissions: bool,
|
||||
}
|
||||
impl Default for RsyncOptions {
|
||||
fn default() -> Self {
|
||||
@@ -29,6 +31,7 @@ impl Default for RsyncOptions {
|
||||
force: true,
|
||||
ignore_existing: false,
|
||||
exclude: Vec::new(),
|
||||
no_permissions: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,6 +58,9 @@ impl Rsync {
|
||||
if options.ignore_existing {
|
||||
cmd.arg("--ignore-existing");
|
||||
}
|
||||
if options.no_permissions {
|
||||
cmd.arg("--no-perms");
|
||||
}
|
||||
for exclude in options.exclude {
|
||||
cmd.arg(format!("--exclude={}", exclude));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user