documentcloud / closure-compiler

A Ruby Wrapper for the Google Closure Compiler

Home Page:http://github.com/documentcloud/closure-compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler fails to start when temporary path contains whitespace

agross opened this issue · comments

Tested on Windows. When I run a build with TeamCity $TEMP a path that contains whitespace. TempFile.new copies the compiler jar over there and then tries to run it. That fails because the jarfile path needs escaping.

I don't know if my fix would work in Linux, for Windows at least we need to quote paths.

Perhaps the best way is to let Ruby do the escaping and rather use system *[command, '--js', tempfile.path], check the exit code, or use popen.

Closing in favor of your pull request...