Fix exit code of "tinc get".
Successfully getting an existing variable ("tinc get name") should not result in an error exitcode (1) from the tinc command. This changes the result of test/commandline.test from FAIL to PASS.
This commit is contained in:
parent
5ae1ec8d80
commit
9fe5ab7ccb
1 changed files with 5 additions and 2 deletions
|
@ -1635,9 +1635,12 @@ static int cmd_config(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
if(action < -1) {
|
||||
if(!found)
|
||||
if(found) {
|
||||
return 0;
|
||||
} else {
|
||||
fprintf(stderr, "No matching configuration variables found.\n");
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure we wrote everything...
|
||||
|
|
Loading…
Reference in a new issue