reinject: Error out when run on a file that is not annexed

rather than silently skipping it
This commit is contained in:
Joey Hess 2021-05-07 13:31:03 -04:00
parent 4bf7940d6b
commit 921753ac44
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 14 additions and 1 deletions

View file

@ -44,7 +44,9 @@ startSrcDest :: [FilePath] -> CommandStart
startSrcDest ps@(src:dest:[])
| src == dest = stop
| otherwise = notAnnexed src' $
ifAnnexed (toRawFilePath dest) go stop
ifAnnexed (toRawFilePath dest)
go
(giveup $ src ++ " is not an annexed file")
where
src' = toRawFilePath src
go key = starting "reinject" ai si $