diff --git a/app/ghcup/BrickMain.hs b/app/ghcup/BrickMain.hs index 7143f52..4e449a7 100644 --- a/app/ghcup/BrickMain.hs +++ b/app/ghcup/BrickMain.hs @@ -61,7 +61,9 @@ import qualified Data.Text.Lazy as L import qualified Graphics.Vty as Vty import qualified Data.Vector as V import System.Environment (getExecutablePath) +#if !IS_WINDOWS import qualified System.Posix.Process as SPP +#endif hiddenTools :: [Tool] @@ -500,12 +502,15 @@ install' _ (_, ListResult {..}) = do forM_ (_viPostInstall =<< vi) $ \msg -> logInfo msg case lTool of GHCup -> do +#if !IS_WINDOWS up <- liftIO $ fmap (either (const Nothing) Just) $ try @_ @SomeException $ canonicalizePath (binDir "ghcup" <.> exeExt) when ((normalise <$> up) == Just (normalise ce)) $ -- TODO: track cli arguments of previous invocation liftIO $ SPP.executeFile ce False ["tui"] Nothing +#else logInfo "Please restart 'ghcup' for the changes to take effect" +#endif _ -> pure () pure $ Right () VRight (vi, _, _) -> do diff --git a/lib/GHCup/Types.hs b/lib/GHCup/Types.hs index 974a9ab..53b3c3c 100644 --- a/lib/GHCup/Types.hs +++ b/lib/GHCup/Types.hs @@ -475,7 +475,7 @@ data KeyBindings = KeyBindings deriving (Show, GHC.Generic) instance NFData KeyBindings -#if defined(IS_WINDOWS) || !defined(BRICK) +#if !defined(BRICK) instance NFData Key instance NFData Modifier