Skip to content

Commit 757696c

Browse files
committed
fixed '\e[m' creeping into compressed result on windows OS'
1 parent 7a9b34b commit 757696c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/closure/compiler.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Error < StandardError; end
1111
class Compiler
1212

1313
attr_accessor :options
14-
14+
1515
DEFAULT_OPTIONS = {
1616
:warning_level => 'QUIET',
1717
:language_in => 'ECMASCRIPT5'
@@ -58,7 +58,8 @@ def compile_files(files)
5858
@options.merge!(:js => files)
5959

6060
begin
61-
result = `#{command} 2>&1`
61+
redirect_stderr = "2>&1" if !Gem.win_platform?
62+
result = `#{command} #{redirect_stderr}`
6263
rescue Exception
6364
raise Error, "compression failed: #{result}"
6465
end

0 commit comments

Comments
 (0)