rust/rhg/src/main.rs
changeset 48729 99b1dfc06571
parent 48510 7f633432ca92
child 48730 1aaf11e35aec
equal deleted inserted replaced
48728:3199b575375d 48729:99b1dfc06571
   667     if config.has_non_empty_section(b"decode") {
   667     if config.has_non_empty_section(b"decode") {
   668         Err(CommandError::unsupported("[decode] config"))?
   668         Err(CommandError::unsupported("[decode] config"))?
   669     }
   669     }
   670 
   670 
   671     if let Some(color) = config.get(b"ui", b"color") {
   671     if let Some(color) = config.get(b"ui", b"color") {
   672         if (color == b"always" || color == b"debug") && !ui.plain() {
   672         if (color == b"always" || color == b"debug")
       
   673             && !ui.plain(Some("color"))
       
   674         {
   673             Err(CommandError::unsupported("colored output"))?
   675             Err(CommandError::unsupported("colored output"))?
   674         }
   676         }
   675     }
   677     }
   676 
   678 
   677     Ok(())
   679     Ok(())