Skip to content

Commit

Permalink
Initialize log and config files right after parsing arguments (helix-…
Browse files Browse the repository at this point in the history
  • Loading branch information
alevinval authored and Schuyler Mortimer committed Jul 10, 2024
1 parent f0eb8a6 commit 07be119
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helix-term/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ FLAGS:

let args = Args::parse_args().context("could not parse arguments")?;

helix_loader::initialize_config_file(args.config_file.clone());
helix_loader::initialize_log_file(args.log_file.clone());

// Help has a higher priority and should be handled separately.
if args.display_help {
print!("{}", help);
Expand Down Expand Up @@ -109,9 +112,6 @@ FLAGS:
return Ok(0);
}

helix_loader::initialize_config_file(args.config_file.clone());
helix_loader::initialize_log_file(args.log_file.clone());

setup_logging(args.verbosity).context("failed to initialize logging")?;

let config = match Config::load_default() {
Expand Down

0 comments on commit 07be119

Please sign in to comment.