diff options
author | Andrew Cady <d@jerkface.net> | 2019-10-15 14:07:40 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-10-15 14:09:29 -0400 |
commit | 99bf49daa7c86877b22c755c3308d16d1abd0035 (patch) | |
tree | e26dbfe92f9a56d2bcd034286e48dfbd525777e3 | |
parent | 4f6e2688618364d21435b8bda0aed724eec6b65a (diff) |
improved error reporting
-rw-r--r-- | fsmgr.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -296,8 +296,8 @@ shakeRules = do | |||
296 | "_build/*.btrfs" %> \out -> do | 296 | "_build/*.btrfs" %> \out -> do |
297 | let cfgFile = (out -<.> "yaml.canon") | 297 | let cfgFile = (out -<.> "yaml.canon") |
298 | need [cfgFile] | 298 | need [cfgFile] |
299 | cfg <- read <$> readFile' cfgFile | 299 | cfg <- readEither <$> readFile' cfgFile |
300 | buildRoot cfg out | 300 | either (error . (("Error parsing file: " ++ cfgFile ++ ": ") ++)) (flip buildRoot out) cfg |
301 | "*.btrfs" %> \out -> do | 301 | "*.btrfs" %> \out -> do |
302 | need ["_build" </> out] | 302 | need ["_build" </> out] |
303 | -- WithStderr False needed for `cp` to interact with the tty | 303 | -- WithStderr False needed for `cp` to interact with the tty |