rust/rhg/src/main.rs
changeset 50764 8ff187fbbfea
parent 50352 14b57943ae6d
child 50809 53d77f96e049
--- a/rust/rhg/src/main.rs	Thu Jul 06 14:32:07 2023 +0200
+++ b/rust/rhg/src/main.rs	Mon Feb 13 18:11:48 2023 +0100
@@ -86,7 +86,8 @@
         // Mercurial allows users to define generic hooks for commands,
         // fallback if any are detected
         let item = format!("{}-{}", prefix, subcommand_name);
-        let hook_for_command = config.get_str(b"hooks", item.as_bytes())?;
+        let hook_for_command =
+            config.get_str_no_default(b"hooks", item.as_bytes())?;
         if hook_for_command.is_some() {
             let msg = format!("{}-{} hook defined", prefix, subcommand_name);
             return Err(CommandError::unsupported(msg));