mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-16 03:16:20 +00:00
ihaskell: remove argv0 dependency
This commit is contained in:
parent
c5d9d43cec
commit
8098108b58
@ -80,7 +80,6 @@ library
|
||||
split >= 0.2,
|
||||
stm -any,
|
||||
strict >=0.3,
|
||||
system-argv0 -any,
|
||||
text >=0.11,
|
||||
time >= 1.6,
|
||||
transformers -any,
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user