Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote branch 'jdmorgan/master'

  • Loading branch information...
commit 9a290e7badda9ab991f15ea609bf9b7d7f3b2eac 2 parents e93fbb8 + c9e114c
@wagenet wagenet authored
View
11 lib/sproutcore/builders/minify.rb
@@ -42,10 +42,11 @@ def build_css(dst_path)
yui_root = File.expand_path(File.join(LIBPATH, '..', 'vendor', 'yui-compressor'))
jar_path = File.join(yui_root, 'yuicompressor-2.4.2.jar')
FileUtils.mkdir_p(File.dirname(dst_path)) # make sure loc exists...
- filecompress = "java -jar " + jar_path + " --charset utf-8 --line-break 0 --nomunge --preserve-semi --disable-optimizations " + entry.source_path + " -o \"" + dst_path + "\" 2>&1"
+ filecompress = "java -jar \"" + jar_path + "\" --charset utf-8 --line-break 0 --nomunge --preserve-semi --disable-optimizations \"" + entry.source_path + "\" -o \"" + dst_path + "\" 2>&1"
SC.logger.info 'Compressing CSS with YUI .... '+ dst_path
- SC.logger.debug `#{filecompress}`
-
+ output = `#{filecompress}`
+ SC.logger.debug '#{output}'
+
if $?.exitstatus != 0
_report_error(output, entry.filename, entry.source_path)
SC.logger.fatal("!!!!YUI compressor failed, please check that your css code is valid.")
@@ -65,7 +66,7 @@ def build_javascript(dst_path)
yui_root = File.expand_path(File.join(LIBPATH, '..', 'vendor', 'yui-compressor'))
jar_path = File.join(yui_root, 'yuicompressor-2.4.2.jar')
FileUtils.mkdir_p(File.dirname(dst_path)) # make sure loc exists...
- filecompress = "java -jar " + jar_path + " --charset utf-8 --line-break 80 " + entry.source_path + " -o \"" + dst_path + "\" 2>&1"
+ filecompress = "java -jar \"" + jar_path + "\" --charset utf-8 --line-break 80 \"" + entry.source_path + "\" -o \"" + dst_path + "\" 2>&1"
SC.logger.info 'Compressing with YUI: '+ dst_path + "..."
output = `#{filecompress}` # It'd be nice to just read STDERR, but
@@ -84,7 +85,7 @@ def build_inline_javascript(dst_path)
yui_root = File.expand_path(File.join(LIBPATH, '..', 'vendor', 'yui-compressor'))
jar_path = File.join(yui_root, 'yuicompressor-2.4.2.jar')
FileUtils.mkdir_p(File.dirname(dst_path)) # make sure loc exists...
- filecompress = "java -jar " + jar_path + " --charset utf-8 --line-break 80 " + entry.source_path + " -o \"" + dst_path + "\" 2>&1"
+ filecompress = "java -jar \"" + jar_path + "\" --charset utf-8 --line-break 80 \"" + entry.source_path + "\" -o \"" + dst_path + "\" 2>&1"
SC.logger.info 'Compressing with YUI: '+ dst_path + "..."
output = `#{filecompress}` # It'd be nice to just read STDERR, but
View
2  lib/sproutcore/tools/build.rb
@@ -90,7 +90,7 @@ def build(*targets)
if $to_minify.length > 0
yui_root = File.expand_path(File.join(LIBPATH, '..', 'vendor', 'yui-compressor'))
jar_path = File.join(yui_root, 'SCyuicompressor-2.4.2.jar')
- filecompress = "java -jar " + jar_path + " --charset utf-8 --line-break 80 " + $to_minify * ' ' + " 2>&1"
+ filecompress = "java -jar \"" + jar_path + "\" --charset utf-8 --line-break 80 \"" + $to_minify * "\" \"" + "\" 2>&1"
SC.logger.info 'Compressing with YUI...'
output = `#{filecompress}` # It'd be nice to just read STDERR, but
Please sign in to comment.
Something went wrong with that request. Please try again.