From 562a461c56334bbf466ed1c42e3fc9650207c62f Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 27 Nov 2013 10:07:26 +0100 Subject: [PATCH] Disable rake color output unless connected to TTY --- lib/tasks/gitlab/task_helpers.rake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/tasks/gitlab/task_helpers.rake b/lib/tasks/gitlab/task_helpers.rake index ac2c4577c77..c46d5855faf 100644 --- a/lib/tasks/gitlab/task_helpers.rake +++ b/lib/tasks/gitlab/task_helpers.rake @@ -2,6 +2,16 @@ module Gitlab class TaskAbortedByUserError < StandardError; end end +unless STDOUT.isatty + module Colored + extend self + + def colorize(string, options={}) + string + end + end +end + namespace :gitlab do # Ask if the user wants to continue