aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/vendor/thor/lib/thor/shell/color.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/vendor/thor/lib/thor/shell/color.rb')
-rw-r--r--lib/bundler/vendor/thor/lib/thor/shell/color.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/vendor/thor/lib/thor/shell/color.rb b/lib/bundler/vendor/thor/lib/thor/shell/color.rb
index 6c821d4a09..29f280202d 100644
--- a/lib/bundler/vendor/thor/lib/thor/shell/color.rb
+++ b/lib/bundler/vendor/thor/lib/thor/shell/color.rb
@@ -97,7 +97,11 @@ class Bundler::Thor
protected
def can_display_colors?
- stdout.tty?
+ stdout.tty? && !are_colors_disabled?
+ end
+
+ def are_colors_disabled?
+ !ENV['NO_COLOR'].nil?
end
# Overwrite show_diff to show diff with colors if Diff::LCS is