aboutsummaryrefslogtreecommitdiffstats
path: root/Cakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Cakefile')
-rw-r--r--Cakefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Cakefile b/Cakefile
index d38fa425..0fa75e24 100644
--- a/Cakefile
+++ b/Cakefile
@@ -1,9 +1,14 @@
+util = require "util"
fs = require "fs"
path = require "path"
child_process = require "child_process"
-{Utils} = require './lib/utils'
spawn = (procName, optArray, silent=false) ->
+ if process.platform is "win32"
+ # if win32, prefix arguments with "/c {original command}"
+ # e.g. "coffee -c c:\git\vimium" becomes "cmd.exe /c coffee -c c:\git\vimium"
+ optArray.unshift "/c", procName
+ procName = "cmd.exe"
proc = child_process.spawn procName, optArray
unless silent
proc.stdout.on 'data', (data) -> process.stdout.write data
@@ -112,6 +117,7 @@ task "test", "run all tests", (options) ->
process.exit 0
task "coverage", "generate coverage report", ->
+ {Utils} = require './lib/utils'
temp = require 'temp'
tmpDir = temp.mkdirSync null
jscoverage = spawn "jscoverage", [".", tmpDir].concat optArrayFromDict