Skip to content

Commit

Permalink
Fix for properly work in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaggyYeti committed Jun 24, 2014
1 parent bdf6e07 commit ece0111
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/scala/sass/SassCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ object SassCompiler {
val parentPath = sassFile.getParentFile.getAbsolutePath

val (cssOutput, dependencies) = runCompiler(
Seq(sassCommand, "-l", "-I", parentPath) ++ options ++ Seq(sassFile.getAbsolutePath)
sassCommand ++ Seq("-l", "-I", parentPath) ++ options ++ Seq(sassFile.getAbsolutePath)
)


val (compressedCssOutput, ignored) = runCompiler(
Seq(sassCommand, "-t", "compressed", "-I", parentPath) ++ options ++ Seq(sassFile.getAbsolutePath)
sassCommand ++ Seq("-t", "compressed", "-I", parentPath) ++ options ++ Seq(sassFile.getAbsolutePath)
)

(cssOutput, compressedCssOutput)
Expand All @@ -38,7 +37,7 @@ object SassCompiler {
}


private def sassCommand = if (isWindows) "sass.bat" else "sass"
private def sassCommand = if (isWindows) Seq("cmd","/c","sass.bat") else Seq("sass")

private val isWindows = System.getProperty("os.name").toLowerCase().indexOf("win") >= 0

Expand Down

0 comments on commit ece0111

Please sign in to comment.