Permalink
Browse files

Allow for spaces in file paths

  • Loading branch information...
wagenet committed Sep 19, 2010
1 parent 38cffad commit 57831f7dc59d019a72e04ea2b21dd16e53fe670a
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/sproutcore/builders/minify.rb
  2. +1 −1 lib/sproutcore/tools/build.rb
@@ -40,7 +40,7 @@ def build_css(dst_path)
FileUtils.copy(entry.source_path, dst_path)
else
FileUtils.mkdir_p(File.dirname(dst_path)) # make sure loc exists...
- filecompress = "java -jar " + SC.yui_jar + " --charset utf-8 --line-break 0 --nomunge --preserve-semi --disable-optimizations " + entry.source_path + " -o \"" + dst_path + "\" 2>&1"
+ filecompress = "java -jar \"" + SC.yui_jar + "\" --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}`
@@ -61,7 +61,7 @@ def build_javascript(dst_path)
FileUtils.copy(entry.source_path, dst_path)
else
FileUtils.mkdir_p(File.dirname(dst_path)) # make sure loc exists...
- filecompress = "java -jar " + SC.yui_jar + " --charset utf-8 --line-break 80 " + entry.source_path + " -o \"" + dst_path + "\" 2>&1"
+ filecompress = "java -jar \"" + SC.yui_jar + "\" --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
@@ -78,7 +78,7 @@ def build_javascript(dst_path)
def build_inline_javascript(dst_path)
SC.logger.info 'Compressing inline Javascript with YUI: ' + dst_path + "..."
FileUtils.mkdir_p(File.dirname(dst_path)) # make sure loc exists...
- filecompress = "java -jar " + SC.yui_jar + " --charset utf-8 --line-break 80 " + entry.source_path + " -o \"" + dst_path + "\" 2>&1"
+ filecompress = "java -jar \"" + SC.yui_jar + "\" --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
@@ -87,7 +87,7 @@ def build(*targets)
end
if $to_minify.length > 0
- filecompress = "java -jar " + SC.yui_jar + " --charset utf-8 --line-break 80 " + $to_minify * ' ' + " 2>&1"
+ filecompress = "java -jar \"" + SC.yui_jar + "\" --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

0 comments on commit 57831f7

Please sign in to comment.