mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-04-06 16:29:05 +02:00
etc/diskspace: better error when no directory
[skip ci]
This commit is contained in:
parent
87b1e78af1
commit
db4ca5274a
@ -111,7 +111,7 @@ withOneDirectory_ act = do
|
|||||||
[l] -> withCurrentDirectory l act
|
[l] -> withCurrentDirectory l act
|
||||||
_ -> do
|
_ -> do
|
||||||
cwd <- getCurrentDirectory
|
cwd <- getCurrentDirectory
|
||||||
error $ "more than one directory found in " ++ cwd ++ ": " ++ unwords ls
|
error $ show (length ls) ++ "directories found in " ++ cwd ++ ": " ++ unwords ls
|
||||||
|
|
||||||
withOneDirectory :: (FilePath -> IO a) -> IO a
|
withOneDirectory :: (FilePath -> IO a) -> IO a
|
||||||
withOneDirectory act = do
|
withOneDirectory act = do
|
||||||
@ -120,4 +120,4 @@ withOneDirectory act = do
|
|||||||
[l] -> withCurrentDirectory l $ act l
|
[l] -> withCurrentDirectory l $ act l
|
||||||
_ -> do
|
_ -> do
|
||||||
cwd <- getCurrentDirectory
|
cwd <- getCurrentDirectory
|
||||||
error $ "more than one directory found in " ++ cwd ++ ": " ++ unwords ls
|
error $ show (length ls) ++ "directories found in " ++ cwd ++ ": " ++ unwords ls
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user