[feat] introduce Config for centralized runtime settings; refactor progress management and backend selection to leverage config

This commit is contained in:
2025-08-12 02:57:42 +02:00
parent ee67b56d6b
commit 9120e8fb26
4 changed files with 63 additions and 19 deletions

View File

@@ -107,6 +107,13 @@ impl ProgressFactory {
_ => ProgressManager::noop(),
}
}
/// Preferred constructor using Config. Respects config.no_progress and TTY.
pub fn from_config(config: &crate::Config) -> Self {
// Prefer Config.no_progress over manual flag; still honor NO_PROGRESS env var.
let force_disable = config.no_progress;
Self::new(force_disable)
}
}
#[derive(Clone)]