change verb when dry-running
This commit is contained in:
parent
cfe3ac83eb
commit
6c3e5a5c4e
6
Main.hs
6
Main.hs
@ -142,9 +142,13 @@ runAction settings name x = do
|
||||
printFailed msg = T.putStrLn ("- " <> name <> " cleaning failed:\n " <> msg)
|
||||
printResult (n, bad)
|
||||
| n > 0 = do
|
||||
T.putStrLn ("- " <> name <> ": deleted " <> T.pack (show n) <> " entries for:")
|
||||
T.putStrLn ("- " <> name <> ": " <> verb <>
|
||||
" " <> T.pack (show n) <> " entries for:")
|
||||
T.putStrLn (T.unlines $ map (" * " <>) bad)
|
||||
| otherwise = T.putStrLn ("- " <> name <> ": nothing to delete")
|
||||
verb = if (dryRun . options $ settings)
|
||||
then "would delete"
|
||||
else "deleted"
|
||||
|
||||
|
||||
-- * Cleaning actions
|
||||
|
Loading…
Reference in New Issue
Block a user