Disable color mode of test-syntax-suggest when on dumb terminal

The compliation-mode of Emacs sets TERM to "dumb" and does not support
coloring.
This commit is contained in:
Nobuyoshi Nakada 2023-03-08 20:40:06 +09:00
parent e1bd45624c
commit 611a64250a
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -16,6 +16,12 @@ RSpec.configure do |config|
config.expect_with :rspec do |c|
c.syntax = :expect
end
if config.color_mode == :automatic
if color_enabled? and (ENV["TERM"] == "dumb" or ENV["NO_COLOR"]&.slice(0))
config.color_mode = :off
end
end
end
# Used for debugging modifications to