rust/rhg/src/main.rs
changeset 48770 f19be290756a
parent 48734 3e2b4bb286e7
child 48972 6b31c0676147
child 49149 006688e36e12
--- a/rust/rhg/src/main.rs	Mon Feb 07 13:23:58 2022 +0100
+++ b/rust/rhg/src/main.rs	Fri Nov 26 15:38:04 2021 +0100
@@ -1,6 +1,6 @@
 extern crate log;
 use crate::error::CommandError;
-use crate::ui::Ui;
+use crate::ui::{local_to_utf8, Ui};
 use clap::App;
 use clap::AppSettings;
 use clap::Arg;
@@ -383,7 +383,7 @@
 ) -> ! {
     if let (
         OnUnsupported::Fallback { executable },
-        Err(CommandError::UnsupportedFeature { .. }),
+        Err(CommandError::UnsupportedFeature { message }),
     ) = (&on_unsupported, &result)
     {
         let mut args = std::env::args_os();
@@ -413,6 +413,8 @@
             ));
             on_unsupported = OnUnsupported::Abort
         } else {
+            log::debug!("falling back (see trace-level log)");
+            log::trace!("{}", local_to_utf8(message));
             // `args` is now `argv[1..]` since we’ve already consumed
             // `argv[0]`
             let mut command = Command::new(executable_path);