[pbs-devel] [PATCH proxmox-backup] report: use '$' instead of '#' for showing commands

Oguz Bektas o.bektas at proxmox.com
Tue Nov 10 16:01:46 CET 2020


since some files can contain '#' character for comments. (i.e.,
/etc/hosts)

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 src/server/report.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/server/report.rs b/src/server/report.rs
index 9513434f..bc2179b9 100644
--- a/src/server/report.rs
+++ b/src/server/report.rs
@@ -57,7 +57,7 @@ pub fn generate_report() -> String {
                 Ok(None) => String::from("# file does not exist"),
                 Err(err) => err.to_string(),
             };
-            format!("# cat '{}'\n{}", file_name, content)
+            format!("$ cat '{}'\n{}", file_name, content)
         })
         .collect::<Vec<String>>()
         .join("\n\n");
@@ -73,14 +73,14 @@ pub fn generate_report() -> String {
                 Ok(output) => String::from_utf8_lossy(&output.stdout).to_string(),
                 Err(err) => err.to_string(),
             };
-            format!("# `{} {}`\n{}", command, args.join(" "), output)
+            format!("$ `{} {}`\n{}", command, args.join(" "), output)
         })
         .collect::<Vec<String>>()
         .join("\n\n");
 
     let function_outputs = function_calls()
         .iter()
-        .map(|(desc, function)| format!("# {}\n{}", desc, function()))
+        .map(|(desc, function)| format!("$ {}\n{}", desc, function()))
         .collect::<Vec<String>>()
         .join("\n\n");
 
-- 
2.20.1





More information about the pbs-devel mailing list