gpgtar: Emit FAILURE status line.

* tools/gpgtar.c (main): Write status line before exit.
--

Due to the new way we support gpgtar in GPGME we need status lines to
detect a final error.

GnuPG-bug-id: 6497
This commit is contained in:
Werner Koch 2023-05-19 13:06:18 +02:00
parent faf0a97b2e
commit 097701e698
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 10 additions and 0 deletions

View File

@ -588,9 +588,19 @@ main (int argc, char **argv)
default:
log_error (_("invalid command (there is no implicit command)\n"));
err = 0;
break;
}
if (opt.status_stream)
{
if (err || log_get_errorcount (0))
es_fprintf (opt.status_stream, "[GNUPG:] FAILURE - %u\n",
err? err : gpg_error (GPG_ERR_GENERAL));
else
es_fprintf (opt.status_stream, "[GNUPG:] SUCCESS\n");
}
return log_get_errorcount (0)? 1:0;
}