factor out installStack' function
This commit is contained in:
parent
9a79af6fd2
commit
42d4a66493
@ -854,13 +854,14 @@ installStackBindist dlinfo ver = do
|
|||||||
let lInstStack = headMay . reverse . sort $ sVers
|
let lInstStack = headMay . reverse . sort $ sVers
|
||||||
when (maybe True (ver >=) lInstStack) $ liftE $ setStack ver
|
when (maybe True (ver >=) lInstStack) $ liftE $ setStack ver
|
||||||
|
|
||||||
where
|
|
||||||
-- | Install an unpacked stack distribution.
|
-- | Install an unpacked stack distribution.
|
||||||
installStack' :: (MonadLogger m, MonadCatch m, MonadIO m)
|
installStack' :: (MonadLogger m, MonadCatch m, MonadIO m)
|
||||||
=> FilePath -- ^ Path to the unpacked stack bindist (where the executable resides)
|
=> FilePath -- ^ Path to the unpacked stack bindist (where the executable resides)
|
||||||
-> FilePath -- ^ Path to install to
|
-> FilePath -- ^ Path to install to
|
||||||
|
-> Version
|
||||||
-> Excepts '[CopyError] m ()
|
-> Excepts '[CopyError] m ()
|
||||||
installStack' path inst = do
|
installStack' path inst ver = do
|
||||||
lift $ $(logInfo) "Installing stack"
|
lift $ $(logInfo) "Installing stack"
|
||||||
let stackFile = "stack"
|
let stackFile = "stack"
|
||||||
liftIO $ createDirRecursive' inst
|
liftIO $ createDirRecursive' inst
|
||||||
@ -873,7 +874,6 @@ installStackBindist dlinfo ver = do
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
--[ Set GHC/cabal ]--
|
--[ Set GHC/cabal ]--
|
||||||
---------------------
|
---------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user