summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2013-11-27 10:07:26 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2013-11-27 10:09:46 +0100
commit562a461c56334bbf466ed1c42e3fc9650207c62f (patch)
tree2543ff3c9dd06304f956ae43eb364ac3aabfeb60
parent44c55307a0dc1d011cb9deabb2f1d631ebd2cb63 (diff)
downloadgitlab-ce-562a461c56334bbf466ed1c42e3fc9650207c62f.tar.gz
Disable rake color output unless connected to TTY
-rw-r--r--lib/tasks/gitlab/task_helpers.rake10
1 files changed, 10 insertions, 0 deletions
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