From: Simon Marlow Date: Wed, 7 Nov 2007 10:06:53 +0000 (+0000) Subject: FIX #1838: use System.Directory.getHomeDirectory instead of getEnv "HOME" X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=e216a6a757dc2791e7f21251b01989feaba56e44 FIX #1838: use System.Directory.getHomeDirectory instead of getEnv "HOME" --- 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