Allow to skip update checks

This commit is contained in:
2021-06-13 15:05:39 +02:00
parent 7e31798446
commit 08b0ecd057
2 changed files with 5 additions and 1 deletions

View File

@@ -1144,7 +1144,10 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
case optCommand of
Upgrade _ _ -> pure ()
_ -> runLogger $ flip runReaderT appstate $ checkForUpdates
_ -> do
lookupEnv "GHCUP_SKIP_UPDATE_CHECK" >>= \case
Nothing -> runLogger $ flip runReaderT appstate $ checkForUpdates
Just _ -> pure ()
-- ensure global tools