show error message on unexpected parameters to commands that take none

Before it would exit nonzero w/o doing anything, which was confusing.
This commit is contained in:
Joey Hess 2011-05-28 20:01:45 -04:00
parent 8a4a3be9f6
commit a19d81a42e

View file

@ -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