Skip to content

Commit

Permalink
Do etags hashing wrt #193
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Jul 24, 2021
1 parent 9639e69 commit d95bdfa
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 331 deletions.
4 changes: 2 additions & 2 deletions app/ghcup-gen/Validate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ validateTarballs (TarballFilter etool versionRegex) dls gt = do
case etool of
Right (Just GHCup) -> do
tmpUnpack <- lift mkGhcupTmpDir
_ <- liftE $ download dli tmpUnpack Nothing
_ <- liftE $ download (_dlUri dli) (Just (_dlHash dli)) tmpUnpack Nothing False
pure Nothing
Right _ -> do
p <- liftE $ downloadCached dli Nothing
Expand All @@ -266,7 +266,7 @@ validateTarballs (TarballFilter etool versionRegex) dls gt = do
$ p
Left ShimGen -> do
tmpUnpack <- lift mkGhcupTmpDir
_ <- liftE $ download dli tmpUnpack Nothing
_ <- liftE $ download (_dlUri dli) (Just (_dlHash dli)) tmpUnpack Nothing False
pure Nothing
case r of
VRight (Just basePath) -> do
Expand Down
2 changes: 1 addition & 1 deletion lib/GHCup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2137,7 +2137,7 @@ upgradeGHCup mtarget force' = do
dli <- liftE $ getDownloadInfo GHCup latestVer
tmp <- lift withGHCupTmpDir
let fn = "ghcup" <> exeExt
p <- liftE $ download dli tmp (Just fn)
p <- liftE $ download (_dlUri dli) (Just (_dlHash dli)) tmp (Just fn) False
let destDir = takeDirectory destFile
destFile = fromMaybe (binDir </> fn) mtarget
lift $ $(logDebug) [i|mkdir -p #{destDir}|]
Expand Down
Loading

0 comments on commit d95bdfa

Please sign in to comment.