aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/cave.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients/cave/cave.cc')
-rw-r--r--src/clients/cave/cave.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/clients/cave/cave.cc b/src/clients/cave/cave.cc
index 13ff28c8e..b7f55ed42 100644
--- a/src/clients/cave/cave.cc
+++ b/src/clients/cave/cave.cc
@@ -33,6 +33,7 @@
#include "command_factory.hh"
#include "command_line.hh"
+#include "format_user_config.hh"
using namespace paludis;
using std::endl;
@@ -85,8 +86,15 @@ int main(int argc, char * argv[])
cave_var = cave_var + " --" + cmdline.a_environment.long_name() + " " + cmdline.a_environment.argument();
if (cmdline.a_log_level.specified())
cave_var = cave_var + " --" + cmdline.a_log_level.long_name() + " " + cmdline.a_log_level.argument();
+ if (cmdline.a_colour.specified())
+ cave_var = cave_var + " --" + cmdline.a_colour.long_name() + " " + cmdline.a_colour.argument();
setenv("CAVE", cave_var.c_str(), 1);
+ if (cmdline.a_colour.argument() == "yes")
+ cave::set_want_colours(true);
+ else if (cmdline.a_colour.argument() == "no")
+ cave::set_want_colours(false);
+
Log::get_instance()->set_program_name(argv[0]);
Log::get_instance()->set_log_level(cmdline.a_log_level.option());
std::shared_ptr<Environment> env(EnvironmentFactory::get_instance()->create(cmdline.a_environment.argument()));