Skip to content

Commit

Permalink
Show the path of the cleaned project
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospb19 committed Dec 25, 2022
1 parent 2068941 commit 68271d3
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,15 @@ fn main() -> anyhow::Result<()> {
for project_path in &paths {
match remove_not_built_with(project_path, matches.value_of("toolchains"), dry_run) {
Ok(cleaned_amount) if dry_run => {
info!("Would clean: {}", format_bytes(cleaned_amount))
info!(
"Would clean: {} from {project_path:?}",
format_bytes(cleaned_amount)
)
}
Ok(cleaned_amount) => info!("Cleaned {}", format_bytes(cleaned_amount)),
Ok(cleaned_amount) => info!(
"Cleaned {} from {project_path:?}",
format_bytes(cleaned_amount)
),
Err(e) => error!(
"{:?}",
e.context(format!("Failed to clean {:?}", project_path))
Expand All @@ -275,9 +281,15 @@ fn main() -> anyhow::Result<()> {
for project_path in &paths {
match remove_older_until_fits(project_path, size, dry_run) {
Ok(cleaned_amount) if dry_run => {
info!("Would clean: {}", format_bytes(cleaned_amount))
info!(
"Would clean: {} from {project_path:?}",
format_bytes(cleaned_amount)
)
}
Ok(cleaned_amount) => info!("Cleaned {}", format_bytes(cleaned_amount)),
Ok(cleaned_amount) => info!(
"Cleaned {} from {project_path:?}",
format_bytes(cleaned_amount)
),
Err(e) => error!("Failed to clean {:?}: {:?}", project_path, e),
};
}
Expand All @@ -297,9 +309,15 @@ fn main() -> anyhow::Result<()> {
for project_path in &paths {
match remove_older_than(project_path, &keep_duration, dry_run) {
Ok(cleaned_amount) if dry_run => {
info!("Would clean: {}", format_bytes(cleaned_amount))
info!(
"Would clean: {} from {project_path:?}",
format_bytes(cleaned_amount)
)
}
Ok(cleaned_amount) => info!("Cleaned {}", format_bytes(cleaned_amount)),
Ok(cleaned_amount) => info!(
"Cleaned {} from {project_path:?}",
format_bytes(cleaned_amount)
),
Err(e) => error!("Failed to clean {:?}: {:?}", project_path, e),
};
}
Expand Down

0 comments on commit 68271d3

Please sign in to comment.