mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-11 23:08:30 +01:00
fixup! etc/diskspace: better error when no directory
This commit is contained in:
parent
db4ca5274a
commit
fc12852829
@ -111,7 +111,7 @@ withOneDirectory_ act = do
|
||||
[l] -> withCurrentDirectory l act
|
||||
_ -> do
|
||||
cwd <- getCurrentDirectory
|
||||
error $ show (length ls) ++ "directories found in " ++ cwd ++ ": " ++ unwords ls
|
||||
error $ show (length ls) ++ " directories found in " ++ cwd ++ ": " ++ unwords ls
|
||||
|
||||
withOneDirectory :: (FilePath -> IO a) -> IO a
|
||||
withOneDirectory act = do
|
||||
@ -120,4 +120,4 @@ withOneDirectory act = do
|
||||
[l] -> withCurrentDirectory l $ act l
|
||||
_ -> do
|
||||
cwd <- getCurrentDirectory
|
||||
error $ show (length ls) ++ "directories found in " ++ cwd ++ ": " ++ unwords ls
|
||||
error $ show (length ls) ++ " directories found in " ++ cwd ++ ": " ++ unwords ls
|
||||
|
||||
Loading…
Reference in New Issue
Block a user