remove debugging code

This commit is contained in:
Keagan McClelland
2021-09-29 11:17:24 -06:00
parent 5c163a9140
commit b9664e7234

View File

@@ -27,15 +27,7 @@ import Conduit ( (.|)
import qualified Data.Conduit.List as CL import qualified Data.Conduit.List as CL
import Data.Conduit.Process.Typed import Data.Conduit.Process.Typed
import GHC.IO.Exception ( IOErrorType(NoSuchThing) import GHC.IO.Exception ( IOErrorType(NoSuchThing)
, IOException , IOException(ioe_description, ioe_type)
( IOError
, ioe_description
, ioe_errno
, ioe_filename
, ioe_handle
, ioe_location
, ioe_type
)
) )
import Lib.Error import Lib.Error
import System.FilePath ( (</>) ) import System.FilePath ( (</>) )
@@ -43,8 +35,6 @@ import UnliftIO ( MonadUnliftIO
, catch , catch
) )
import UnliftIO ( bracket ) import UnliftIO ( bracket )
import UnliftIO ( finally )
import UnliftIO.Exception ( handle )
readProcessWithExitCode' :: MonadIO m => String -> [String] -> ByteString -> m (ExitCode, ByteString, ByteString) readProcessWithExitCode' :: MonadIO m => String -> [String] -> ByteString -> m (ExitCode, ByteString, ByteString)
readProcessWithExitCode' a b c = liftIO $ do readProcessWithExitCode' a b c = liftIO $ do
@@ -66,7 +56,7 @@ readProcessInheritStderr :: forall m a
-> ByteString -> ByteString
-> (ConduitT () ByteString m () -> m a) -- this is because we can't clean up the process in the unCPS'ed version of this -> (ConduitT () ByteString m () -> m a) -- this is because we can't clean up the process in the unCPS'ed version of this
-> m a -> m a
readProcessInheritStderr a b c sink = handle help $ do readProcessInheritStderr a b c sink = do
let pc = let pc =
setStdin (byteStringInput $ LBS.fromStrict c) setStdin (byteStringInput $ LBS.fromStrict c)
$ setEnvInherit $ setEnvInherit
@@ -85,14 +75,6 @@ readProcessInheritStderr a b c sink = handle help $ do
then pure () then pure ()
else throwIO e else throwIO e
) )
help e@IOError {..} = do
print $ ioe_handle
print $ ioe_type
print $ ioe_location
print $ ioe_description
print $ ioe_errno
print $ ioe_filename
throwIO e
sourceManifest :: (MonadUnliftIO m) => FilePath -> FilePath -> (ConduitT () ByteString m () -> m r) -> m r sourceManifest :: (MonadUnliftIO m) => FilePath -> FilePath -> (ConduitT () ByteString m () -> m r) -> m r
sourceManifest appmgrPath pkgFile sink = do sourceManifest appmgrPath pkgFile sink = do