Include contents of custom assets `metadata.yaml` in `--diagnostics`

This commit is contained in:
Martin Nordholts 2022-03-03 05:58:44 +01:00
parent a153a78d7a
commit 9ab378b5dc
2 changed files with 9 additions and 0 deletions

View File

@ -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)

View File

@ -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())
@ -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")]