diff --git a/ihaskell.cabal b/ihaskell.cabal index d9fbb595..7428fa9b 100644 --- a/ihaskell.cabal +++ b/ihaskell.cabal @@ -80,7 +80,6 @@ library split >= 0.2, stm -any, strict >=0.3, - system-argv0 -any, text >=0.11, time >= 1.6, transformers -any, diff --git a/src/IHaskell/IPython.hs b/src/IHaskell/IPython.hs index d745caf9..a6695514 100644 --- a/src/IHaskell/IPython.hs +++ b/src/IHaskell/IPython.hs @@ -17,11 +17,11 @@ import IHaskellPrelude import qualified Data.Text as T import qualified Data.Text.Lazy as LT -import System.Argv0 import qualified Shelly as SH import qualified System.IO as IO import qualified System.FilePath as FP import System.Directory +import System.Environment (getExecutablePath) import System.Exit (exitFailure) import Data.Aeson (toJSON) import Data.Aeson.Text (encodeToTextBuilder) @@ -178,7 +178,7 @@ subHome path = SH.shelly $ do getIHaskellPath :: SH.Sh FilePath getIHaskellPath = do -- Get the absolute filepath to the argument. - f <- T.unpack <$> SH.toTextIgnore <$> liftIO getArgv0 + f <- liftIO getExecutablePath -- If we have an absolute path, that's the IHaskell we're interested in. if FP.isAbsolute f