diff options
author | Werner Koch <[email protected]> | 2023-05-19 11:06:18 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-05-24 10:13:48 +0000 |
commit | 097701e69835774883d9c055462e22e3111737a0 (patch) | |
tree | 145ede0551cb869572c1420e586ba27d0a033574 | |
parent | gpg: Improve error code for file already exists. (diff) | |
download | gnupg-097701e69835774883d9c055462e22e3111737a0.tar.gz gnupg-097701e69835774883d9c055462e22e3111737a0.zip |
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
-rw-r--r-- | tools/gpgtar.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/gpgtar.c b/tools/gpgtar.c index b2ccc9f8a..492b3d5e5 100644 --- a/tools/gpgtar.c +++ b/tools/gpgtar.c @@ -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; } |