Improve deployments and resets #50
1 changed files with 5 additions and 2 deletions
|
@ -574,7 +574,7 @@ pub(crate) async fn deploy_mods(state: State) -> Result<()> {
|
||||||
|
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
"Deploying {} mods to {}",
|
"Deploying {} mods to {}",
|
||||||
state.mods.len(),
|
state.mods.iter().filter(|i| i.enabled).count(),
|
||||||
state.game_dir.join("bundle").display()
|
state.game_dir.join("bundle").display()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -604,7 +604,10 @@ pub(crate) async fn deploy_mods(state: State) -> Result<()> {
|
||||||
|
|
||||||
if !contains {
|
if !contains {
|
||||||
let task = async move {
|
let task = async move {
|
||||||
let path = bundle_dir.join(file_name);
|
let path = bundle_dir.join(&file_name);
|
||||||
|
|
||||||
|
tracing::debug!("Removing unused bundle '{}'", file_name);
|
||||||
|
|
||||||
if let Err(err) = fs::remove_file(&path).await.wrap_err_with(|| {
|
if let Err(err) = fs::remove_file(&path).await.wrap_err_with(|| {
|
||||||
format!("failed to remove unused bundle '{}'", path.display())
|
format!("failed to remove unused bundle '{}'", path.display())
|
||||||
}) {
|
}) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue