From e216a6a757dc2791e7f21251b01989feaba56e44 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 7 Nov 2007 10:06:53 +0000 Subject: [PATCH] FIX #1838: use System.Directory.getHomeDirectory instead of getEnv "HOME" --- compiler/ghci/InteractiveUI.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index d524ff1..3adcfd3 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -334,7 +334,7 @@ runGHCi paths maybe_expr = do when (read_dot_files) $ do -- Read in $HOME/.ghci - either_dir <- io (IO.try (getEnv "HOME")) + either_dir <- io (IO.try getHomeDirectory) case either_dir of Left _e -> return () Right dir -> do @@ -1535,7 +1535,7 @@ expandPath :: String -> GHCi String expandPath path = case dropWhile isSpace path of ('~':d) -> do - tilde <- io (getEnv "HOME") -- will fail if HOME not defined + tilde <- io getHomeDirectory -- will fail if HOME not defined return (tilde ++ '/':d) other -> return other -- 1.7.10.4