1
0
Fork 0

Fix error

This commit is contained in:
Malte Brandy 2020-06-26 19:23:49 +02:00
parent fc5a532cf4
commit 13432dbb84
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9

View file

@ -11,12 +11,13 @@ let
main = do
(configDir:hostname:args) <- getArgs
paths <- myNixPath $ toText configDir
say [i|Trying to build ${name} config for #{hostname} ...|]
let command = ${commandline}
bracket
(decodeUtf8 <$> ((mktemp |> captureTrim) :: IO ByteString))
(decodeUtf8 <$> (mktemp |> captureTrim))
rm
(\logFile -> onException (command &> Append logFile &!> Append logFile) (cat logFile))
(\logFile -> do
say [i|Trying to build ${name} config for #{hostname}. Logging to #{logFile}.|]
onException (command &> Append logFile &!> Append logFile) (cat logFile))
say [i|Build of ${name} config for #{hostname} was successful.|]
'';
in {