Skip to content

Commit

Permalink
Don't do verify, as hash is an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
dfordivam committed Nov 3, 2024
1 parent 03b46d2 commit df75340
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib-tui/GHCup/Brick/Actions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ installWithOptions opts (_, ListResult {..}) = do
, InstallSetError
]

withNoVerify :: (MonadReader AppState m) => m a -> m a
withNoVerify = local (\s -> s { settings = (settings s) { noVerify = True}})

run (do
ce <- liftIO $ fmap (either (const Nothing) Just) $
try @_ @SomeException $ getExecutablePath >>= canonicalizePath
Expand All @@ -243,7 +246,7 @@ installWithOptions opts (_, ListResult {..}) = do
Just uri -> do
liftE $
runBothE'
(installGHCBindist
(withNoVerify $ installGHCBindist
(DownloadInfo uri (Just $ RegexDir "ghc-.*") "" Nothing Nothing)
v
shouldIsolate
Expand All @@ -264,7 +267,7 @@ installWithOptions opts (_, ListResult {..}) = do
Just uri -> do
liftE $
runBothE'
(installCabalBindist (DownloadInfo uri Nothing "" Nothing Nothing) lVer shouldIsolate shouldForce)
(withNoVerify $ installCabalBindist (DownloadInfo uri Nothing "" Nothing Nothing) lVer shouldIsolate shouldForce)
(when (shouldSet && isNothing misolated) (liftE $ void $ setCabal lVer))
pure (vi, dirs, ce)

Expand All @@ -283,7 +286,7 @@ installWithOptions opts (_, ListResult {..}) = do
Just uri -> do
liftE $
runBothE'
(installHLSBindist
(withNoVerify $ installHLSBindist
(DownloadInfo uri (if isWindows then Nothing else Just (RegexDir "haskell-language-server-*")) "" Nothing Nothing)
lVer
shouldIsolate
Expand All @@ -303,7 +306,7 @@ installWithOptions opts (_, ListResult {..}) = do
Just uri -> do
liftE $
runBothE'
(installStackBindist (DownloadInfo uri Nothing "" Nothing Nothing) lVer shouldIsolate shouldForce)
(withNoVerify $ installStackBindist (DownloadInfo uri Nothing "" Nothing Nothing) lVer shouldIsolate shouldForce)
(when (shouldSet && isNothing misolated) (liftE $ void $ setStack lVer))
pure (vi, dirs, ce)

Expand Down

0 comments on commit df75340

Please sign in to comment.