git-annex/doc/bugs/Adding_metadata.mdwn
Joey Hess bb060f000f
error when metadata set is used with file that does not exist
When setting metadata of a file that did not exist, no error message was
displayed, unlike getting metadata and most other git-annex commands. Fixed
this oversight.

Note that, if the file exists but is not annexed, there's no error.
This is the same behavior as other git-annex commands.

This commit was supported by the NSF-funded DataLad project.
2017-06-01 11:40:47 -04:00

18 lines
1.1 KiB
Markdown

### Please describe the problem.
This is less of a bug and more of a feature(?) request. Currently, when assigning metadata to a datafile, git annex (v5.20150710-g8fd705) will produce no error or warning message if the file entered does not exist. This can be a tad confusing to users who might expect to see some output if they typed their path wrong. A successful `git annex metadata <filename> -s tags=best` will produce output acknowledging the change, but a failure produces no output at all. A quick check if the file exists, and a `File does not exist` error message if not, would be easy implement and helpful to new users.
### What steps will reproduce the problem?
git annex metadata <filename> -s tags+=atlas
Where <filename> does not exist.
### What version of git-annex are you using? On what operating system?
v5.20150710-g8fd705
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
We use git-annex for our open-source !FreeSurfer software and find very helpful indeed. Thank you. https://surfer.nmr.mgh.harvard.edu/
> [fixed|done]] --[[Joey]]