From 9117a1a5b711d1a73188d5652a8edb210bb1d665 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Sun, 16 May 2021 14:08:47 +0200 Subject: [PATCH] no file contents changelog --- CHANGELOG.md | 1 + Cargo.toml | 4 ++-- src/bug_report.rs | 22 +++++++--------------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99847c5c..a4de4f1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Added - merging branches, pull-merge with conflicts, commit merges ([#485](https://github.com/extrawurst/gitui/issues/485)) - warning if commit subject line gets too long ([#478](https://github.com/extrawurst/gitui/issues/478)) +- `--bugreport` cmd line arg to help diagnostics [[@zcorniere](https://github.com/zcorniere)] ([#695](https://github.com/extrawurst/gitui/issues/695)) ## Changed - smarter log timestamps ([#682](https://github.com/extrawurst/gitui/issues/682)) diff --git a/Cargo.toml b/Cargo.toml index 5a9fc994..8b4195cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,9 +40,9 @@ serde = "1.0" anyhow = "1.0" unicode-width = "0.1" textwrap = "0.13" -unicode-truncate = "0.2.0" +unicode-truncate = "0.2" easy-cast = "0.4" -bugreport = "0.4.0" +bugreport = "0.4" [target.'cfg(all(target_family="unix",not(target_os="macos")))'.dependencies] which = "4.1" diff --git a/src/bug_report.rs b/src/bug_report.rs index f9a6d135..4d6dabc2 100644 --- a/src/bug_report.rs +++ b/src/bug_report.rs @@ -3,31 +3,23 @@ use bugreport::{ bugreport, collector::{ CommandLine, CompileTimeInformation, EnvironmentVariables, - FileContent, OperatingSystem, SoftwareVersion, + OperatingSystem, SoftwareVersion, }, format::Markdown, }; -use crate::get_app_config_path; - pub fn generate_bugreport() -> Result<()> { - let mut config_file = get_app_config_path()?; - config_file.push("gitui/"); - bugreport!() .info(SoftwareVersion::default()) .info(OperatingSystem::default()) .info(CompileTimeInformation::default()) - .info(EnvironmentVariables::list(&["SHELL", "EDITOR"])) + .info(EnvironmentVariables::list(&[ + "SHELL", + "EDITOR", + "GIT_EDITOR", + "VISUAL", + ])) .info(CommandLine::default()) - .info(FileContent::new( - "theme.ron", - config_file.with_file_name("theme.ron"), - )) - .info(FileContent::new( - "key_config.ron", - config_file.with_file_name("key_config.ron"), - )) .print::(); Ok(()) }