Fix CPP defines for windows+brick
This commit is contained in:
parent
ba4c6e5b99
commit
9fcacbd96b
@ -61,7 +61,9 @@ import qualified Data.Text.Lazy as L
|
|||||||
import qualified Graphics.Vty as Vty
|
import qualified Graphics.Vty as Vty
|
||||||
import qualified Data.Vector as V
|
import qualified Data.Vector as V
|
||||||
import System.Environment (getExecutablePath)
|
import System.Environment (getExecutablePath)
|
||||||
|
#if !IS_WINDOWS
|
||||||
import qualified System.Posix.Process as SPP
|
import qualified System.Posix.Process as SPP
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
hiddenTools :: [Tool]
|
hiddenTools :: [Tool]
|
||||||
@ -500,12 +502,15 @@ install' _ (_, ListResult {..}) = do
|
|||||||
forM_ (_viPostInstall =<< vi) $ \msg -> logInfo msg
|
forM_ (_viPostInstall =<< vi) $ \msg -> logInfo msg
|
||||||
case lTool of
|
case lTool of
|
||||||
GHCup -> do
|
GHCup -> do
|
||||||
|
#if !IS_WINDOWS
|
||||||
up <- liftIO $ fmap (either (const Nothing) Just)
|
up <- liftIO $ fmap (either (const Nothing) Just)
|
||||||
$ try @_ @SomeException $ canonicalizePath (binDir </> "ghcup" <.> exeExt)
|
$ try @_ @SomeException $ canonicalizePath (binDir </> "ghcup" <.> exeExt)
|
||||||
when ((normalise <$> up) == Just (normalise ce)) $
|
when ((normalise <$> up) == Just (normalise ce)) $
|
||||||
-- TODO: track cli arguments of previous invocation
|
-- TODO: track cli arguments of previous invocation
|
||||||
liftIO $ SPP.executeFile ce False ["tui"] Nothing
|
liftIO $ SPP.executeFile ce False ["tui"] Nothing
|
||||||
|
#else
|
||||||
logInfo "Please restart 'ghcup' for the changes to take effect"
|
logInfo "Please restart 'ghcup' for the changes to take effect"
|
||||||
|
#endif
|
||||||
_ -> pure ()
|
_ -> pure ()
|
||||||
pure $ Right ()
|
pure $ Right ()
|
||||||
VRight (vi, _, _) -> do
|
VRight (vi, _, _) -> do
|
||||||
|
@ -475,7 +475,7 @@ data KeyBindings = KeyBindings
|
|||||||
deriving (Show, GHC.Generic)
|
deriving (Show, GHC.Generic)
|
||||||
|
|
||||||
instance NFData KeyBindings
|
instance NFData KeyBindings
|
||||||
#if defined(IS_WINDOWS) || !defined(BRICK)
|
#if !defined(BRICK)
|
||||||
instance NFData Key
|
instance NFData Key
|
||||||
|
|
||||||
instance NFData Modifier
|
instance NFData Modifier
|
||||||
|
Loading…
Reference in New Issue
Block a user