improving safety commands

This commit is contained in:
2024-10-23 23:43:23 +01:00
parent 8081dd8b09
commit 2a111bd22d

View File

@@ -283,8 +283,8 @@ eitherExecProcess cmd opts input =
(show input)
case code of
ExitFailure i -> pure (Left (MkSystemError i err))
_ -> pure (Right out)
ExitFailure i -> pure $ Left $ MkSystemError i err
_ -> pure $ Right out
@@ -319,6 +319,7 @@ eitherSpawnProcP2Prc cmd opts =
let (_, _, _, ph) = creationResult
case creationResult of
(_, _, Just _, _) -> do
terminateProcess ph
pure $ Left $ MkErrorSpawningProcess $ "Error executing: " ++ cmd