Skip to content

Commit

Permalink
fixup! etc/diskspace: better error when no directory
Browse files Browse the repository at this point in the history
  • Loading branch information
juhp committed Sep 12, 2023
1 parent db4ca52 commit fc12852
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etc/diskspace/remove-old-stack-work-libs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit fc12852

Please sign in to comment.