From 5b5508f85567e82d97e7c1a5a0aa87e131ebab39 Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Mon, 30 Mar 2020 20:51:10 +0200 Subject: [PATCH] Consider .tgz as .tar.gz --- src/Niv/GitHub.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Niv/GitHub.hs b/src/Niv/GitHub.hs index a9d57c7..1adcbb0 100644 --- a/src/Niv/GitHub.hs +++ b/src/Niv/GitHub.hs @@ -33,7 +33,7 @@ githubUpdate prefetch latestRev ghRepo = proc () -> do (useOrSet "url_template" <<< completeSpec) <+> (load "url_template") -< () url <- update "url" -< urlTemplate - let isTar = ("tar.gz" `T.isSuffixOf`) <$> url + let isTar = (\u -> "tar.gz" `T.isSuffixOf` u || ".tgz" `T.isSuffixOf` u) <$> url useOrSet "type" -< bool "file" "tarball" <$> isTar :: Box T.Text let doUnpack = isTar _sha256 <- update "sha256" <<< run (\(up, u) -> prefetch up u) -< (,) <$> doUnpack <*> url