##// END OF EJS Templates
rhg: use default configitem in `cat`...
Raphaël Gomès -
r51661:067edf50 default
parent child Browse files
Show More
@@ -32,9 +32,8 b' pub fn args() -> clap::Command {'
32
32
33 #[logging_timer::time("trace")]
33 #[logging_timer::time("trace")]
34 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> {
34 pub fn run(invocation: &crate::CliInvocation) -> Result<(), CommandError> {
35 let cat_enabled_default = true;
35 let cat_enabled = invocation.config.get_bool(b"rhg", b"cat")?;
36 let cat_enabled = invocation.config.get_option(b"rhg", b"cat")?;
36 if !cat_enabled {
37 if !cat_enabled.unwrap_or(cat_enabled_default) {
38 return Err(CommandError::unsupported(
37 return Err(CommandError::unsupported(
39 "cat is disabled in rhg (enable it with 'rhg.cat = true' \
38 "cat is disabled in rhg (enable it with 'rhg.cat = true' \
40 or enable fallback with 'rhg.on-unsupported = fallback')",
39 or enable fallback with 'rhg.on-unsupported = fallback')",
General Comments 0
You need to be logged in to leave comments. Login now