summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2014-03-26 12:05:24 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2014-03-26 12:05:24 +0100
commit969f2351efc8569ff451eeca282de28896974f48 (patch)
treef48540362eb82daeda01a3153b1240e13e924ec4 /src
parent81a970c2930ad90308fb690c2bb71c7ef8ca6167 (diff)
parentda7ae99b122280849e57fc695bdc67b4433d76b3 (diff)
downloadhakyll-969f2351efc8569ff451eeca282de28896974f48.tar.gz
Merge pull request #233 from rekahsoft/master
Fix unixFilter on Windows
Diffstat (limited to 'src')
-rw-r--r--src/Hakyll/Core/UnixFilter.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Hakyll/Core/UnixFilter.hs b/src/Hakyll/Core/UnixFilter.hs
index 34b2ecb..e9a2cc1 100644
--- a/src/Hakyll/Core/UnixFilter.hs
+++ b/src/Hakyll/Core/UnixFilter.hs
@@ -19,7 +19,7 @@ import System.Exit (ExitCode (..))
import System.IO (Handle, hClose, hFlush, hGetContents,
hPutStr, hSetEncoding, localeEncoding)
import System.Process
-
+import System.Info
--------------------------------------------------------------------------------
import Hakyll.Core.Compiler
@@ -105,8 +105,12 @@ unixFilterIO :: Monoid o
-> i
-> IO (o, String, ExitCode)
unixFilterIO writer reader programName args input = do
+ let pr = if os == "mingw32"
+ then shell $ unwords (programName : args)
+ else proc programName args
+
(Just inh, Just outh, Just errh, pid) <-
- createProcess (proc programName args)
+ createProcess pr
{ std_in = CreatePipe
, std_out = CreatePipe
, std_err = CreatePipe