CmdVersion: Color only used for tty

This commit is contained in:
Paul Beckingham 2015-11-15 14:40:37 -05:00
parent ec779bb0e8
commit a6f8d93fe1

View file

@ -72,12 +72,12 @@ int CmdVersion::execute (std::string& output)
link.add (Column::factory ("string", ""));
link.set (link.addRow (), 0, STRING_CMD_VERSION_DOCS);
Color bold ("bold");
Color bold;
if (context.color ())
bold = Color ("bold");
out << "\n"
<< format (STRING_CMD_VERSION_BUILT,
(context.color () ? bold.colorize (PACKAGE) : PACKAGE),
(context.color () ? bold.colorize (VERSION) : VERSION))
<< format (STRING_CMD_VERSION_BUILT, bold.colorize (PACKAGE), bold.colorize (VERSION))
#if defined (DARWIN)
<< "darwin"