lib/flare_up/emitter.rb in flare-up-0.5 vs lib/flare_up/emitter.rb in flare-up-0.6
- old
+ new
@@ -20,10 +20,10 @@
end
# TODO: How do we test this?
def self.sanitize(message)
RISKY_OPTIONS.each do |risky_option|
- message.gsub!(@BOOT_OPTIONS[risky_option], 'REDACTED')
+ message.gsub!(@BOOT_OPTIONS[risky_option], 'REDACTED') if @BOOT_OPTIONS[risky_option]
end
message.gsub!(/\e\[(\d+)(;\d+)*m/, '') unless @BOOT_OPTIONS[:colorize_output]
message
end
\ No newline at end of file