From fc12852829eabced8b1d4643d6f190f76f4f83e2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 12 Sep 2023 20:48:55 +0800 Subject: [PATCH] fixup! etc/diskspace: better error when no directory --- etc/diskspace/remove-old-stack-work-libs.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/diskspace/remove-old-stack-work-libs.hs b/etc/diskspace/remove-old-stack-work-libs.hs index b0e7a3621..f39622572 100755 --- a/etc/diskspace/remove-old-stack-work-libs.hs +++ b/etc/diskspace/remove-old-stack-work-libs.hs @@ -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