Skip to content

Commit

Permalink
Include contents of custom assets metadata.yaml in --diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
Enselic committed Mar 7, 2022
1 parent a153a78 commit 9ab378b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

## Other

- Include contents of custom assets `metadata.yaml` in `--diagnostics`. See #2107 (@Enselic)

## Syntaxes

- Mapped clang-format config file (.clang-format) to YAML syntax (@TruncatedDinosour)
Expand Down
7 changes: 7 additions & 0 deletions src/bin/bat/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ fn invoke_bugreport(app: &App) {
let pager = bat::config::get_pager_executable(app.matches.value_of("pager"))
.unwrap_or_else(|| "less".to_owned()); // FIXME: Avoid non-canonical path to "less".

let mut custom_assets_metadata = PROJECT_DIRS.cache_dir().to_path_buf();
custom_assets_metadata.push("metadata.yaml");

let mut report = bugreport!()
.info(SoftwareVersion::default())
.info(OperatingSystem::default())
Expand All @@ -254,6 +257,10 @@ fn invoke_bugreport(app: &App) {
"MANPAGER",
]))
.info(FileContent::new("Config file", config_file()))
.info(FileContent::new(
"Custom assets metadata",
custom_assets_metadata,
))
.info(CompileTimeInformation::default());

#[cfg(feature = "paging")]
Expand Down

0 comments on commit 9ab378b

Please sign in to comment.