diff --git a/.gitlab/script/ghcup_version.sh b/.gitlab/script/ghcup_version.sh index 5eb71487fa64e3461656018fdf02b295ab70a75c..0c4f3e7d8ddb3bfbd7812b254c297012da4d8f54 100755 --- a/.gitlab/script/ghcup_version.sh +++ b/.gitlab/script/ghcup_version.sh @@ -217,6 +217,8 @@ if [ "${OS}" = "LINUX" ] ; then fi fi +eghcup gc -c + sha_sum() { if [ "${OS}" = "FREEBSD" ] ; then sha256 "$@" diff --git a/app/ghcup/GHCup/OptParse/Compile.hs b/app/ghcup/GHCup/OptParse/Compile.hs index 4d7222426838758cce07c248181f900647e4b0b8..6989af954b016968c1811c03d53e9f93a51e7552 100644 --- a/app/ghcup/GHCup/OptParse/Compile.hs +++ b/app/ghcup/GHCup/OptParse/Compile.hs @@ -99,7 +99,7 @@ data HLSCompileOptions = HLSCompileOptions --[ Parsers ]-- --------------- - + compileP :: Parser CompileCommand compileP = subparser ( command @@ -541,11 +541,11 @@ compile compileCommand settings Dirs{..} runAppState runLogger = do pure ExitSuccess VLeft (V (AlreadyInstalled _ v)) -> do runLogger $ logWarn $ - "GHC ver " <> prettyVer v <> " already installed; if you really want to reinstall it, you may want to run 'ghcup install ghc --force " <> prettyVer v <> "'" + "GHC ver " <> prettyVer v <> " already installed, remove it first to reinstall" pure ExitSuccess VLeft (V (DirNotEmpty fp)) -> do - runLogger $ logWarn $ - "Install directory " <> T.pack fp <> " is not empty. Use 'ghcup install ghc --isolate " <> T.pack fp <> " --force ..." <> "' to install regardless." + runLogger $ logError $ + "Install directory " <> T.pack fp <> " is not empty." pure $ ExitFailure 3 VLeft err@(V (BuildFailed tmpdir _)) -> do case keepDirs settings of diff --git a/app/ghcup/GHCup/OptParse/Install.hs b/app/ghcup/GHCup/OptParse/Install.hs index 13b82579e669964239189ea5bb7cb2ae168c4a7b..363ce512ad0ead62832f74eb698f258ad3c9e6b5 100644 --- a/app/ghcup/GHCup/OptParse/Install.hs +++ b/app/ghcup/GHCup/OptParse/Install.hs @@ -210,7 +210,7 @@ installOpts tool = ) ) <*> switch - (short 'f' <> long "force" <> help "Force install") + (short 'f' <> long "force" <> help "Force install (THIS IS UNSAFE, only use it in Dockerfiles or CI)") where setDefault = case tool of Nothing -> False @@ -421,20 +421,20 @@ install installCommand settings getAppState' runLogger = case installCommand of VLeft (V (AlreadyInstalled _ v, ())) -> do runLogger $ logWarn $ - "GHC ver " <> prettyVer v <> " already installed; if you really want to reinstall it, you may want to run 'ghcup install ghc --force " <> prettyVer v <> "'" + "GHC ver " <> prettyVer v <> " already installed, remove it first to reinstall" pure ExitSuccess VLeft (V (AlreadyInstalled _ v)) -> do runLogger $ logWarn $ - "GHC ver " <> prettyVer v <> " already installed; if you really want to reinstall it, you may want to run 'ghcup install ghc --force " <> prettyVer v <> "'" + "GHC ver " <> prettyVer v <> " already installed, remove it first to reinstall" pure ExitSuccess VLeft (V (DirNotEmpty fp)) -> do - runLogger $ logWarn $ - "Install directory " <> T.pack fp <> " is not empty. Use 'ghcup install ghc --isolate " <> T.pack fp <> " --force ..." <> "' to install regardless." + runLogger $ logError $ + "Install directory " <> T.pack fp <> " is not empty." pure $ ExitFailure 3 VLeft (V (DirNotEmpty fp, ())) -> do - runLogger $ logWarn $ - "Install directory " <> T.pack fp <> " is not empty. Use 'ghcup install ghc --isolate " <> T.pack fp <> " --force ..." <> "' to install regardless." + runLogger $ logError $ + "Install directory " <> T.pack fp <> " is not empty." pure $ ExitFailure 3 VLeft err@(V (BuildFailed tmpdir _)) -> do