--- a/rust/rhg/src/main.rs Mon May 24 16:27:54 2021 +0530
+++ b/rust/rhg/src/main.rs Mon Jun 07 17:19:46 2021 +0530
@@ -126,8 +126,8 @@
})
});
- let non_repo_config =
- Config::load(early_args.config).unwrap_or_else(|error| {
+ let mut non_repo_config =
+ Config::load_non_repo().unwrap_or_else(|error| {
// Normally this is decided based on config, but we don’t have that
// available. As of this writing config loading never returns an
// "unsupported" error but that is not enforced by the type system.
@@ -142,6 +142,20 @@
)
});
+ non_repo_config
+ .load_cli_args_config(early_args.config)
+ .unwrap_or_else(|error| {
+ exit(
+ &initial_current_dir,
+ &ui,
+ OnUnsupported::from_config(&ui, &non_repo_config),
+ Err(error.into()),
+ non_repo_config
+ .get_bool(b"ui", b"detailed-exit-code")
+ .unwrap_or(false),
+ )
+ });
+
if let Some(repo_path_bytes) = &early_args.repo {
lazy_static::lazy_static! {
static ref SCHEME_RE: regex::bytes::Regex =