Skip to content

Commit

Permalink
more trace logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Mussmann committed Jan 7, 2025
1 parent bcbe7f1 commit 6a6f917
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,8 @@ fn refresh(
.output()?,
};

log::trace!("finished cli command");

let (stdout, stderr) = (
str::from_utf8(&output.stdout).unwrap(),
str::from_utf8(&output.stderr).unwrap(),
Expand Down Expand Up @@ -777,15 +779,24 @@ fn main() -> ExitCode {
let cache_file = PathBuf::from(DEFAULTS.cache_file);
let experimental_cache_file = PathBuf::from(DEFAULTS.experimental_cache_file);

log::trace!("cache_file: {:?}", cache_file);
log::trace!("experimental_cache_file: {:?}", experimental_cache_file);

let file_path: PathBuf = match cli.experimental {
true => cli.cache_folder.join(&experimental_cache_file),
false => cli.cache_folder.join(&cache_file),
};

log::trace!("file_path: {:?}", file_path);

let cache_file_exists = file_path.exists();

log::trace!("cache_file_exists: {}", cache_file_exists);
log::trace!("cli.refresh: {}", cli.refresh);

// Refresh cache with new info?
if cli.refresh || !cache_file_exists {
log::trace!("inside if");
match refresh(
cli.experimental,
&cli.cache_folder,
Expand Down

0 comments on commit 6a6f917

Please sign in to comment.