summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Run
diff options
context:
space:
mode:
authorSibi Prabakaran <sibi@psibi.in>2020-04-30 19:56:45 +0530
committerjao <jao@gnu.org>2020-04-30 16:45:31 +0100
commita705d021a8cfbb3b9bbfbec833302768d3ad459e (patch)
tree6d52eecacdc3d2536ac83a3c6e0ca8f3f0412bd2 /src/Xmobar/Run
parentb0591c5e4c483aa47ef74ab25448c56cf6e3a82a (diff)
downloadxmobar-a705d021a8cfbb3b9bbfbec833302768d3ad459e.tar.gz
xmobar-a705d021a8cfbb3b9bbfbec833302768d3ad459e.tar.bz2
Refactor the usage of hGetLineSafe
hGetLineSafe is always hGetLine and hence we can directly use it.
Diffstat (limited to 'src/Xmobar/Run')
-rw-r--r--src/Xmobar/Run/Command.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Xmobar/Run/Command.hs b/src/Xmobar/Run/Command.hs
index e6153c1..430d142 100644
--- a/src/Xmobar/Run/Command.hs
+++ b/src/Xmobar/Run/Command.hs
@@ -20,8 +20,7 @@ module Xmobar.Run.Command where
import Control.Exception (handle, SomeException(..))
import System.Process
import System.Exit
-import System.IO (hClose)
-import Xmobar.System.Utils (hGetLineSafe)
+import System.IO (hClose, hGetLine)
import Xmobar.Run.Exec
@@ -47,7 +46,7 @@ instance Exec Command where
exit <- waitForProcess p
let closeHandles = hClose o >> hClose i >> hClose e
getL = handle (\(SomeException _) -> return "")
- (hGetLineSafe o)
+ (hGetLine o)
case exit of
ExitSuccess -> do str <- getL
closeHandles