You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Left e -> warn verbosity ("Error verifying fetched tarball "++ file ++", will redownload: "++show (e ::SomeException)) >>pureFalse
163
-
Right b ->pure b
164
-
in handleError $do
165
-
exists <- doesFileExist file
166
-
ifnot exists
167
-
thenreturnTrue-- if the file does not exist, it vacuously passes validation, since it will be downloaded as necessary with what we will then check is a valid hash.
168
-
elsecase repo of
169
-
-- a secure repo has hashes we can compare against to confirm this is the correct file.
Left e -> warn verbosity ("Error verifying fetched tarball "++ file ++", will redownload: "++show (e ::SomeException)) >>pureFalse
191
+
Right b ->pure b
192
+
in
193
+
handleError $do
194
+
exists <- doesFileExist file
195
+
ifnot exists
196
+
thenreturnTrue-- if the file does not exist, it vacuously passes validation, since it will be downloaded as necessary with what we will then check is a valid hash.
197
+
elsecase mCallbacks of
198
+
-- a secure repo has hashes we can compare against to confirm this is the correct file.
199
+
Just callbacks ->
200
+
let warnAndFail s = warn verbosity ("Fetched tarball "++ file ++" does not match server, will redownload: "++ s) >>returnFalse
201
+
in-- the do block in parens is due to dealing with the checked exceptions mechanism.
0 commit comments