lightly safer docs cron: fail instead of error (#6288)

See @cocreature's comment on #6285.

CHANGELOG_BEGIN
CHANGELOG_END
This commit is contained in:
Gary Verhaegen 2020-06-10 19:18:14 +02:00 committed by GitHub
parent 0544323dfc
commit 9c8c1fa909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,7 +265,7 @@ find_commit_for_version version = do
_ -> Nothing)
case matching of
[sha] -> return sha
_ -> error $ "Expected single commit to match release " <> version <> ", but instead found: " <> show matching
_ -> fail $ "Expected single commit to match release " <> version <> ", but instead found: " <> show matching
fetch_s3_versions :: IO (Set.Set Version, Set.Set Version)
fetch_s3_versions = do
@ -323,7 +323,7 @@ fetch_gh_paginated url = do
in
case typed_regex of
(_, _, _, [url, rel]) -> (rel, url)
_ -> error $ "Assumption violated: link header entry did not match regex.\nEntry: " <> l
_ -> fail $ "Assumption violated: link header entry did not match regex.\nEntry: " <> l
fetch_gh_versions :: IO ([GitHubVersion], GitHubVersion)
fetch_gh_versions = do