From e91de0e9ac597f3aa1bda0692b6ca5b969fdbe5d Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 1 May 2020 09:44:54 +0200 Subject: Flameshot.Internal.Process.run: input bytestrings --- src/Flameshot/Internal/Process.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Flameshot') diff --git a/src/Flameshot/Internal/Process.hs b/src/Flameshot/Internal/Process.hs index e38a145..31e2fee 100644 --- a/src/Flameshot/Internal/Process.hs +++ b/src/Flameshot/Internal/Process.hs @@ -15,7 +15,7 @@ import Data.Text (Text) import qualified Data.Text.IO as T import System.Exit import System.IO (BufferMode(LineBuffering),hSetBuffering) -import System.IO (Handle,hClose,hPutStr,hIsEOF) +import System.IO (Handle,hClose,hIsEOF) import System.IO.Error (catchIOError,isDoesNotExistError) import System.Process import System.Posix.Directory (changeWorkingDirectory) @@ -74,7 +74,7 @@ run :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] - -> String + -> ByteString -> Maybe Int -> Callbacks -> IO () @@ -88,7 +88,7 @@ run path args cwd env input hTimeout Callbacks{..} = onStart pid mapM_ forkIO [ - hPutStr inh input `finally` hClose inh, + BS.hPutStr inh input `finally` hClose inh, hWithLines outh (onOutLine pid), hWithLines errh (onErrLine pid) ] -- cgit v1.2.3