mirror of
https://github.com/utdemir/nix-tree.git
synced 2024-10-05 18:58:59 +03:00
Fix a nonexhaustive pattern match
This commit is contained in:
parent
b18f430668
commit
4eaca0c0bd
@ -110,7 +110,9 @@ getNixVersion = do
|
||||
|
||||
-- split by ".", take the first two, and convert them to numbers
|
||||
(major, minor) <- do
|
||||
let maT : miT : _ = T.splitOn "." ver
|
||||
(maT, miT) <- case T.splitOn "." ver of
|
||||
p1 : p2 : _ -> Just (p1, p2)
|
||||
_ -> Nothing
|
||||
ma <- readMaybe @Natural (toString maT)
|
||||
mi <- readMaybe @Natural (toString miT)
|
||||
return (ma, mi)
|
||||
|
Loading…
Reference in New Issue
Block a user