diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-30 15:28:17 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-30 15:28:17 -0400 |
commit | 508920bf728cfb5e4568b68a2943bd33efac26bc (patch) | |
tree | d04529a6b2529e771a65ac3c724c33067b9ccb2d /CmdLine | |
parent | 4cd5738bb29278498b06b4f4d3edd4962c7a0eea (diff) |
Improve behavior when a git-annex command is told to operate on a file that doesn't exist. It will now continue to other files specified after that on the command line, and only error out at the end.
Diffstat (limited to 'CmdLine')
-rw-r--r-- | CmdLine/Action.hs | 2 | ||||
-rw-r--r-- | CmdLine/Seek.hs | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/CmdLine/Action.hs b/CmdLine/Action.hs index a32abbbee..b566621bb 100644 --- a/CmdLine/Action.hs +++ b/CmdLine/Action.hs @@ -43,7 +43,7 @@ commandAction a = account =<< tryIO go account (Right True) = return True account (Right False) = incerr account (Left err) = do - showErr err + toplevelWarning True (show err) showEndFail incerr incerr = do diff --git a/CmdLine/Seek.hs b/CmdLine/Seek.hs index 1db075ec3..96076261f 100644 --- a/CmdLine/Seek.hs +++ b/CmdLine/Seek.hs @@ -218,8 +218,9 @@ seekHelper a params = do ll <- inRepo $ \g -> concat <$> forM (segmentXargsOrdered params) (runSegmentPaths (\fs -> Git.Command.leaveZombie <$> a fs g)) forM_ (map fst $ filter (null . snd) $ zip params ll) $ \p -> - unlessM (isJust <$> liftIO (catchMaybeIO $ getSymbolicLinkStatus p)) $ - error $ p ++ " not found" + unlessM (isJust <$> liftIO (catchMaybeIO $ getSymbolicLinkStatus p)) $ do + toplevelWarning False (p ++ " not found") + Annex.incError return $ concat ll notSymlink :: FilePath -> IO Bool |