diff options
author | Timo Teräs <timo.teras@iki.fi> | 2021-07-22 14:56:59 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-07-22 15:30:03 +0300 |
commit | 7b58f909fac0dd309355b244af60dc7374d7ef76 (patch) | |
tree | a38d51ad1657cd1b46d7d3e47e8670d9a3bb20eb | |
parent | d909ebc25b23c0ccd698f161ab624c3cdc890e35 (diff) | |
download | apk-tools-7b58f909fac0dd309355b244af60dc7374d7ef76.tar.gz apk-tools-7b58f909fac0dd309355b244af60dc7374d7ef76.tar.bz2 apk-tools-7b58f909fac0dd309355b244af60dc7374d7ef76.tar.xz apk-tools-7b58f909fac0dd309355b244af60dc7374d7ef76.zip |
convndx: add error reporting
-rw-r--r-- | src/app_convndx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/app_convndx.c b/src/app_convndx.c index 440fb3f..6a4e6d7 100644 --- a/src/app_convndx.c +++ b/src/app_convndx.c @@ -71,6 +71,7 @@ static int conv_main(void *pctx, struct apk_ctx *ac, struct apk_string_array *ar char **arg; struct conv_ctx *ctx = pctx; struct apk_trust *trust = apk_ctx_get_trust(ac); + struct apk_out *out = &ac->out; struct adb_obj ndx; int r; @@ -81,7 +82,10 @@ static int conv_main(void *pctx, struct apk_ctx *ac, struct apk_string_array *ar foreach_array_item(arg, args) { r = load_index(ctx, apk_istream_from_url(*arg, apk_ctx_since(ac, 0))); - if (r) goto err; + if (r) { + apk_err(out, "%s: %s", *arg, apk_error_str(r)); + goto err; + } fprintf(stderr, "%s: %u packages\n", *arg, adb_ra_num(&ctx->pkgs)); } |