summaryrefslogtreecommitdiff
path: root/doc/bugs/__39__git_annex_get__39___returns_success_when_file_not_found.mdwn
blob: 93f2a8fd998b02c1d3ab9df2e0035db54def2647 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
### Please describe the problem.
When attempting to 'git annex get' a file that does not exist in the git repository, git-annex correctly reports "not found".  But it still returns exit code 0, incorrectly indicating success.  This is problematic for scripting.

### What steps will reproduce the problem?
See transcript

### What version of git-annex are you using? On what operating system?
git-annex 5.20140517.4 as supplied by 'git-annex' aptitude package on Ubuntu 12.04.4 LTS (32-bit) 

### Please provide any additional information below.

[[!format sh """

henry@commsbox:~/work/tmp$ git init test
Initialized empty Git repository in /home/henry/work/tmp/test/.git/
henry@commsbox:~/work/tmp$ cd test
henry@commsbox:~/work/tmp/test$ git annex init
init  ok
(Recording state in git...)
henry@commsbox:~/work/tmp/test$ git annex get nonexistent.file
git-annex: nonexistent.file not found
henry@commsbox:~/work/tmp/test$ echo $?
0


"""]]

> Ok, I can find no reason why it was implemented as a warning in 
> 5f3661238de9f31e6fed0be74fca9d5f1659278c in the bug report associated
> with that commit. So, promoted to error. [[done]] --[[Joey]]