improve error message

This commit is contained in:
Joey Hess 2018-10-16 15:52:40 -04:00
parent b2bafdb2fc
commit bdf6783b92
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 2 additions and 2 deletions

View file

@ -80,7 +80,7 @@ perform file oldkey oldbackend newbackend = go =<< genkey (fastMigrate oldbacken
forM_ urls $ \url ->
setUrlPresent newkey url
next $ Command.ReKey.cleanup file oldkey newkey
, error "failed"
, giveup "failed creating link from old to new key"
)
genkey Nothing = return Nothing
genkey (Just fm) = fm oldkey newbackend afile >>= \case

View file

@ -68,7 +68,7 @@ perform :: FilePath -> Key -> Key -> CommandPerform
perform file oldkey newkey = do
ifM (inAnnex oldkey)
( unlessM (linkKey file oldkey newkey) $
giveup "failed"
giveup "failed creating link from old to new key"
, unlessM (Annex.getState Annex.force) $
giveup $ file ++ " is not available (use --force to override)"
)