mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 22:39:46 +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:
@@ -467,6 +467,7 @@ async fn migrate(
|
|||||||
force: true,
|
force: true,
|
||||||
ignore_existing: false,
|
ignore_existing: false,
|
||||||
exclude: Vec::new(),
|
exclude: Vec::new(),
|
||||||
|
no_permissions: false,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
@@ -478,6 +479,7 @@ async fn migrate(
|
|||||||
force: true,
|
force: true,
|
||||||
ignore_existing: false,
|
ignore_existing: false,
|
||||||
exclude: vec!["tmp".to_owned()],
|
exclude: vec!["tmp".to_owned()],
|
||||||
|
no_permissions: false,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|||||||
@@ -305,6 +305,7 @@ async fn sync_boot() -> Result<(), Error> {
|
|||||||
force: false,
|
force: false,
|
||||||
ignore_existing: true,
|
ignore_existing: true,
|
||||||
exclude: Vec::new(),
|
exclude: Vec::new(),
|
||||||
|
no_permissions: false,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await?
|
.await?
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ pub struct RsyncOptions {
|
|||||||
pub ignore_existing: bool,
|
pub ignore_existing: bool,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub exclude: Vec<String>,
|
pub exclude: Vec<String>,
|
||||||
|
#[serde(default = "const_true")]
|
||||||
|
pub no_permissions: bool,
|
||||||
}
|
}
|
||||||
impl Default for RsyncOptions {
|
impl Default for RsyncOptions {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
@@ -29,6 +31,7 @@ impl Default for RsyncOptions {
|
|||||||
force: true,
|
force: true,
|
||||||
ignore_existing: false,
|
ignore_existing: false,
|
||||||
exclude: Vec::new(),
|
exclude: Vec::new(),
|
||||||
|
no_permissions: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,6 +58,9 @@ impl Rsync {
|
|||||||
if options.ignore_existing {
|
if options.ignore_existing {
|
||||||
cmd.arg("--ignore-existing");
|
cmd.arg("--ignore-existing");
|
||||||
}
|
}
|
||||||
|
if options.no_permissions {
|
||||||
|
cmd.arg("--no-perms");
|
||||||
|
}
|
||||||
for exclude in options.exclude {
|
for exclude in options.exclude {
|
||||||
cmd.arg(format!("--exclude={}", exclude));
|
cmd.arg(format!("--exclude={}", exclude));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user