mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 10:17:35 +03:00
shake: workaround for a weird error running hakyll-std
This commit is contained in:
parent
140db2011e
commit
08244f0747
18
Shake.hs
18
Shake.hs
@ -35,7 +35,8 @@ multiple individually accessible wildcards
|
||||
not having to write :: Action ExitCode after a non-final cmd
|
||||
-}
|
||||
|
||||
{-# LANGUAGE PackageImports #-}
|
||||
{-# LANGUAGE PackageImports, ScopedTypeVariables #-}
|
||||
|
||||
import Prelude ()
|
||||
import "base-prelude" BasePrelude
|
||||
import "extra" Data.List.Extra
|
||||
@ -263,8 +264,19 @@ main = do
|
||||
hakyllstd %> \out -> do
|
||||
let dir = takeDirectory out
|
||||
need [out <.> "hs", dir </> "TableOfContents.hs"] -- XXX hard-coded dep
|
||||
unit $ cmd (Cwd dir) "./hakyll-std.hs --version" -- ensure libs are up to date
|
||||
cmd (Cwd dir) "stack ghc hakyll-std" -- compile for speed
|
||||
-- install libs via shebang line
|
||||
-- XXX 2016/10/29 why has this started giving
|
||||
-- "./hakyll-std.hs: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory))"
|
||||
unit $ liftIO $
|
||||
cmd (Cwd dir) "./hakyll-std.hs --version"
|
||||
`catch` (\(e::IOException) -> putStr $ unlines $
|
||||
["I could not run ./hakyll-std.hs in "++dir++" to install Hakyll."
|
||||
,"If you see a hakyll-std build error after this, please do it manually:"
|
||||
,"$ (cd site/hakyll-std; ./hakyll-std.hs --version)"
|
||||
,"and try again."
|
||||
])
|
||||
-- compile
|
||||
cmd (Cwd dir) "stack ghc hakyll-std"
|
||||
|
||||
-- cleanup
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user