Merge branch 'feat/cli-ux-progress'
This commit is contained in:
commit
27a1b806cd
44 changed files with 4995 additions and 106 deletions
|
|
@ -1,20 +1,28 @@
|
|||
fn main() {
|
||||
let loaded_config = aim_cli::cli::config::AppConfig::load();
|
||||
let loaded_theme_config = aim_cli::cli::config::AppConfig::load();
|
||||
aim_cli::ui::theme::set_active_theme(aim_cli::ui::theme::resolve_theme(
|
||||
&loaded_config.config.theme,
|
||||
&loaded_theme_config.config.theme,
|
||||
));
|
||||
for warning in loaded_config.warnings {
|
||||
for warning in loaded_theme_config.warnings {
|
||||
eprintln!(
|
||||
"{}",
|
||||
aim_cli::ui::theme::warning_text(&format!("Config warning: {warning}"))
|
||||
);
|
||||
}
|
||||
|
||||
let config = match aim_cli::config::load() {
|
||||
Ok(config) => config,
|
||||
Err(error) => {
|
||||
eprintln!("{error}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
let cli = aim_cli::parse();
|
||||
let mut reporter = aim_cli::ui::progress::TerminalProgressReporter::stderr();
|
||||
match aim_cli::dispatch_with_reporter(cli, &mut reporter) {
|
||||
Ok(result) => {
|
||||
let output = aim_cli::render(&result);
|
||||
let output = aim_cli::render_with_config(&result, &config);
|
||||
if !output.is_empty() {
|
||||
if reporter.emitted_output() {
|
||||
println!();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue