diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-06-04 13:59:23 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-06-10 10:39:18 +0200 |
| commit | 7a11893ae5560e87b5fd4a1cdc5f29193fddf787 (patch) | |
| tree | acae7bc58fa1b1a9471198fa59cc01814aac4e52 | |
| parent | d20fed36f95e2d535b2272777a78dc84ed9e1e6b (diff) | |
| download | mullvadvpn-7a11893ae5560e87b5fd4a1cdc5f29193fddf787.tar.xz mullvadvpn-7a11893ae5560e87b5fd4a1cdc5f29193fddf787.zip | |
Add extra help output to the problem-report CLI command
| -rw-r--r-- | mullvad-problem-report/src/main.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mullvad-problem-report/src/main.rs b/mullvad-problem-report/src/main.rs index 8d47ebbb98..ae8762c102 100644 --- a/mullvad-problem-report/src/main.rs +++ b/mullvad-problem-report/src/main.rs @@ -15,6 +15,7 @@ use std::{ borrow::Cow, cmp::min, collections::{HashMap, HashSet}, + env, ffi::OsStr, fs::{self, File}, io::{self, BufWriter, Read, Seek, SeekFrom, Write}, @@ -191,7 +192,13 @@ fn run() -> Result<(), Error> { .map(|os_values| os_values.map(Path::new).collect()) .unwrap_or_else(Vec::new); let output_path = Path::new(collect_matches.value_of_os("output").unwrap()); - collect_report(&extra_logs, output_path, redact_custom_strings) + collect_report(&extra_logs, output_path, redact_custom_strings)?; + + println!("Problem report written to \"{}\"", output_path.display()); + println!(""); + println!("Send the problem report to support via the send subcommand. See:"); + println!(" $ {} send --help", env::args().next().unwrap()); + Ok(()) } else if let Some(send_matches) = matches.subcommand_matches("send") { let report_path = Path::new(send_matches.value_of_os("report").unwrap()); let user_email = send_matches.value_of("email").unwrap_or(""); @@ -362,6 +369,7 @@ impl ProblemReport { }, )); self.logs.push((redacted_path, content)); + println!("Adding {} to report", expanded_path.display()); } } |
