disable colors if they're already enabled
This commit is contained in:
parent
ed749136e5
commit
ee8f8382cb
@ -33,7 +33,8 @@ Tested in the following environments:
|
||||
|
||||
Current supported options:
|
||||
|
||||
* `-c` enables color output
|
||||
* `-c`/`--colors` enables color output
|
||||
* `--no-colors` disables color output
|
||||
|
||||
These options can also be placed into a `.jasmine-headless-webkit` file in your project root.
|
||||
|
||||
|
@ -5,7 +5,8 @@ require 'fileutils'
|
||||
require 'getoptlong'
|
||||
|
||||
opts = GetoptLong.new(
|
||||
[ '--colors', '-c', GetoptLong::NO_ARGUMENT ]
|
||||
[ '--colors', '-c', GetoptLong::NO_ARGUMENT ],
|
||||
[ '--no-colors', GetoptLong::NO_ARGUMENT ]
|
||||
)
|
||||
|
||||
options = { :colors => false }
|
||||
@ -15,6 +16,8 @@ process_options = lambda { |*args|
|
||||
case opt
|
||||
when '--colors', '-c'
|
||||
options[:colors] = true
|
||||
when '--no-colors', '-nc'
|
||||
options[:colors] = false
|
||||
end
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user