--- a/rust/rhg/src/main.rs Thu Feb 10 11:58:04 2022 +0100
+++ b/rust/rhg/src/main.rs Thu Feb 10 12:12:56 2022 +0100
@@ -137,7 +137,6 @@
let process_start_time = blackbox::ProcessStartTime::now();
env_logger::init();
- let ui = ui::Ui::new();
let early_args = EarlyArgs::parse(std::env::args_os());
@@ -151,7 +150,7 @@
.unwrap_or_else(|error| {
exit(
&None,
- &ui,
+ &Ui::new(&Config::empty()),
OnUnsupported::Abort,
Err(CommandError::abort(format!(
"abort: {}: '{}'",
@@ -172,7 +171,7 @@
exit(
&initial_current_dir,
- &ui,
+ &Ui::new(&Config::empty()),
on_unsupported,
Err(error.into()),
false,
@@ -184,7 +183,7 @@
.unwrap_or_else(|error| {
exit(
&initial_current_dir,
- &ui,
+ &Ui::new(&non_repo_config),
OnUnsupported::from_config(&non_repo_config),
Err(error.into()),
non_repo_config
@@ -202,7 +201,7 @@
if SCHEME_RE.is_match(&repo_path_bytes) {
exit(
&initial_current_dir,
- &ui,
+ &Ui::new(&non_repo_config),
OnUnsupported::from_config(&non_repo_config),
Err(CommandError::UnsupportedFeature {
message: format_bytes!(
@@ -292,7 +291,7 @@
}
Err(error) => exit(
&initial_current_dir,
- &ui,
+ &Ui::new(&non_repo_config),
OnUnsupported::from_config(&non_repo_config),
Err(error.into()),
// TODO: show a warning or combine with original error if
@@ -308,6 +307,7 @@
} else {
&non_repo_config
};
+ let ui = Ui::new(&config);
let on_unsupported = OnUnsupported::from_config(config);
let result = main_with_result(