From a19d81a42e4af0e8fc2ad0c09f1ebd72fb98cdd4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 28 May 2011 20:01:45 -0400 Subject: show error message on unexpected parameters to commands that take none Before it would exit nonzero w/o doing anything, which was confusing. --- Command.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Command.hs b/Command.hs index a07ae6e09..0da847d24 100644 --- a/Command.hs +++ b/Command.hs @@ -176,7 +176,7 @@ withTempFile :: CommandSeekStrings withTempFile a params = return $ map a params withNothing :: CommandSeekNothing withNothing a [] = return [a] -withNothing _ _ = return [] +withNothing _ _ = error "This command takes no parameters." backendPairs :: CommandSeekBackendFiles backendPairs a files = liftM (map a) $ Backend.chooseBackends files -- cgit v1.2.3