aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-05-19 11:06:18 +0000
committerWerner Koch <[email protected]>2023-05-26 13:55:54 +0000
commitea286895477f05dd38c047b93bb25803a6de767a (patch)
tree2279d494646e4d4b21fb400407b2e5fbc4f7d945
parentagent: Fix printed error in findkey. (diff)
downloadgnupg-ea286895477f05dd38c047b93bb25803a6de767a.tar.gz
gnupg-ea286895477f05dd38c047b93bb25803a6de767a.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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/gpgtar.c b/tools/gpgtar.c
index 207f553bc..9d791f75a 100644
--- a/tools/gpgtar.c
+++ b/tools/gpgtar.c
@@ -566,9 +566,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;
}