improving safety commands
This commit is contained in:
@@ -283,8 +283,8 @@ eitherExecProcess cmd opts input =
|
|||||||
(show input)
|
(show input)
|
||||||
|
|
||||||
case code of
|
case code of
|
||||||
ExitFailure i -> pure (Left (MkSystemError i err))
|
ExitFailure i -> pure $ Left $ MkSystemError i err
|
||||||
_ -> pure (Right out)
|
_ -> pure $ Right out
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -319,6 +319,7 @@ eitherSpawnProcP2Prc cmd opts =
|
|||||||
let (_, _, _, ph) = creationResult
|
let (_, _, _, ph) = creationResult
|
||||||
|
|
||||||
case creationResult of
|
case creationResult of
|
||||||
|
|
||||||
(_, _, Just _, _) -> do
|
(_, _, Just _, _) -> do
|
||||||
terminateProcess ph
|
terminateProcess ph
|
||||||
pure $ Left $ MkErrorSpawningProcess $ "Error executing: " ++ cmd
|
pure $ Left $ MkErrorSpawningProcess $ "Error executing: " ++ cmd
|
||||||
|
|||||||
Reference in New Issue
Block a user