diff options
author | Joey Hess <joey@kitenet.net> | 2011-05-28 20:01:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-05-28 20:02:43 -0400 |
commit | a19d81a42e4af0e8fc2ad0c09f1ebd72fb98cdd4 (patch) | |
tree | 73708d78f339078a0a5659a6d9c61270e8b234de /Command.hs | |
parent | 8a4a3be9f6573c090d8d919ea1453d18264941ad (diff) |
show error message on unexpected parameters to commands that take none
Before it would exit nonzero w/o doing anything, which was confusing.
Diffstat (limited to 'Command.hs')
-rw-r--r-- | Command.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |