convert from readFileStrict

This removes that function, using file-io readFile' instead.

Had to deal with newline conversion, which readFileStrict does on
Windows. In a few cases, that was pretty ugly to deal with.

Sponsored-by: Kevin Mueller
This commit is contained in:
Joey Hess 2025-01-22 16:19:06 -04:00
parent de1af273e0
commit 6e27b0d4d1
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
19 changed files with 94 additions and 71 deletions

View file

@ -502,8 +502,10 @@ resolveSpecialRemoteWebUrl url
Url.download' nullMeterUpdate Nothing url tmp' uo >>= \case
Left err -> giveup $ url ++ " " ++ err
Right () -> liftIO $
(headMaybe . lines)
<$> readFileStrict tmp'
fmap decodeBS
. headMaybe
. fileLines'
<$> F.readFile' tmp
| otherwise = return Nothing
where
lcurl = map toLower url