summaryrefslogtreecommitdiff
path: root/Checks.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Checks.hs')
-rw-r--r--Checks.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Checks.hs b/Checks.hs
index 6a70fc52d..e443811cd 100644
--- a/Checks.hs
+++ b/Checks.hs
@@ -24,12 +24,12 @@ repoExists = CommandCheck 0 ensureInitialized
fromOpt :: CommandCheck
fromOpt = CommandCheck 1 $ do
v <- Annex.getState Annex.fromremote
- unless (v == Nothing) $ error "cannot use --from with this command"
+ unless (isNothing v) $ error "cannot use --from with this command"
toOpt :: CommandCheck
toOpt = CommandCheck 2 $ do
v <- Annex.getState Annex.toremote
- unless (v == Nothing) $ error "cannot use --to with this command"
+ unless (isNothing v) $ error "cannot use --to with this command"
dontCheck :: CommandCheck -> Command -> Command
dontCheck check cmd = mutateCheck cmd $ \c -> filter (/= check) c