docpad / docpad-plugin-sass

Adds support for the SASS and SCSS CSS pre-processors to DocPad. It also supports the Compass framework.
Other
13 stars 6 forks source link

Does not run on Windows with spaces in binary or output path #32

Open sebastian-lenz opened 10 years ago

sebastian-lenz commented 10 years ago

I ran into a little issue while trying to install DocPad with SASS support on a Windows machine. When executing DocPad there is an error thrown caused by the SASS plugin when trying to launch the compiler in a location something like C:\Program Files\ruby\rubygems\gem\sass.bat. The path is not correctly escaped and the plugin tries to run C:\Program. Same problem seems to apply when the path to the *.sass files contains spaces. As this is the default application folder in Windows, this seems not like an unusual scenario.

I've tried to modify line 97 of src/sass.plugin.coffee to look something like this:

command = [].concat(if safeps.isWindows() then execPath.replace(/ /g, '^ ') else execPath)

but this leads to a strange error sockets timeout.