mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-11 23:08:30 +01:00
remove-old-stack-work-libs.hs: need to check regexp match result
This commit is contained in:
parent
86e5490e70
commit
f905c9455d
@ -28,8 +28,9 @@ main = do
|
||||
|
||||
extractNameInternal :: String -> String
|
||||
extractNameInternal p =
|
||||
let (name,_,internal) = p =~ "-[0-9.]+-[0-9A-Za-z]{20,22}" :: (String, String, String)
|
||||
in name ++ internal
|
||||
let (name,match,internal) = p =~ "-[0-9.]+-[0-9A-Za-z]{20,22}" :: (String, String, String)
|
||||
in if null match || null name then error $ p ++ " not in correct name-version-hash format"
|
||||
else name ++ internal
|
||||
|
||||
samePkgDynLib d1 d2 = pkgDynName d1 == pkgDynName d2
|
||||
where
|
||||
|
||||
Loading…
Reference in New Issue
Block a user