summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2015-06-25 08:19:34 +0000
committerJacob Vosmaer <contact@jacobvosmaer.nl>2015-06-25 08:19:34 +0000
commit7005e249b9096278a74a7b5751b1e789fa41725d (patch)
tree84cc5cb458861e1df4f8ada04dbb353b417f5a05 /lib
parent7c71fe9c3cf64972bb03f74fb0bcb76b9a38ecac (diff)
parent7ae983a91b19624539c03f5d82719218e27e8ecf (diff)
downloadgitlab-ci-7005e249b9096278a74a7b5751b1e789fa41725d.tar.gz
Merge branch 'silent_rake' into 'master'
Disable colors in rake tasks automatically https://gitlab.com/gitlab-org/gitlab-ci/issues/164/ See merge request !166
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/backup.rake10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake
index 84f9bcd..3431bd1 100644
--- a/lib/tasks/backup.rake
+++ b/lib/tasks/backup.rake
@@ -41,3 +41,13 @@ namespace :backup do
end
end
+# Disable colors for CRON
+unless STDOUT.isatty
+ module Colored
+ extend self
+
+ def colorize(string, options={})
+ string
+ end
+ end
+end