From 8ff9b53365fc855d6b2294eeb815ab456cbfe84e Mon Sep 17 00:00:00 2001 From: Emil Engler Date: Wed, 19 Jul 2023 16:37:15 +0200 Subject: [PATCH] cli: include a static compiled manual page This commit re-introduces a static and pre-compiled version of the manual page back into the source code, in case that an installed version cannot be found on the host system. --- src/cli.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 2b7d577..3e19b0a 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -104,9 +104,13 @@ impl Cli { use Cli::*; match cli { Man => { - let _man_cmd = std::process::Command::new("man") + let man_cmd = std::process::Command::new("man") .args(["1", "rosenpass"]) .status(); + + if !(man_cmd.is_ok() && man_cmd.unwrap().success()) { + println!(include_str!(env!("ROSENPASS_MAN"))); + } } GenConfig { config_file, force } => { ensure!(