remove-old-stack-work-libs.hs: hash can also be 20 chars!

This commit is contained in:
Jens Petersen 2020-05-19 12:23:02 +08:00
parent fda199ba9f
commit 6383d6e6fd

View File

@ -31,7 +31,7 @@ main = do
if length dashes < 2
then error $ p ++ " not in name-version-hash format"
else let final = last dashes in
if length p - final `elem` [22,23] then take final p
if length p - final `elem` [23,22,21] then take final p
else error $ p ++ " has incorrect hash length"
removeDashSegment = init . dropWhileEnd (/= '-')