avoid backtrace when rekey cntent verification fails
authorJoey Hess <joeyh@joeyh.name>
Tue, 22 Nov 2016 05:16:18 +0000 (01:16 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 22 Nov 2016 05:16:18 +0000 (01:16 -0400)
Command/ReKey.hs

index 51f9f6fe1579ae9150df773852bbcdd2cb1544ee..33734ebe79d40abaec5eea2259240d34697b7ebd 100644 (file)
@@ -44,7 +44,7 @@ perform :: FilePath -> Key -> Key -> CommandPerform
 perform file oldkey newkey = do
        ifM (inAnnex oldkey) 
                ( unlessM (linkKey file oldkey newkey) $
-                       error "failed"
+                       giveup "failed"
                , unlessM (Annex.getState Annex.force) $
                        giveup $ file ++ " is not available (use --force to override)"
                )