aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2020-01-22 21:18:12 -0500
committerJason Woodward2020-01-22 21:19:10 -0500
commit0fae7af6f5fd3fc36cdf5d2e7b6d97989f970f69 (patch)
tree9207700f05280f7f10b554141d563673e1e754b3
parent1d2c0cd8a7e8d557087384b06ff6ffb8bac8b714 (diff)
downloadslapt-src-0fae7af6f5fd3fc36cdf5d2e7b6d97989f970f69.tar.gz
fix return code for when downloads fail
-rw-r--r--src/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index b2c0b94..0aa67c1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -125,7 +125,7 @@ static void init_builddir(slapt_src_config *config)
int main(int argc, char *argv[])
{
- int c = -1, option_index = 0, action = 0, rval = 0;
+ int c = -1, option_index = 0, action = 0;
slapt_vector_t *names = slapt_vector_t_init(free);
slapt_src_config *config = NULL;
slapt_vector_t *sbs = NULL;
@@ -352,7 +352,8 @@ int main(int argc, char *argv[])
/* now, actually do what was requested */
switch (action) {
case UPDATE_OPT:
- rval = slapt_src_update_slackbuild_cache(config);
+ if (!slapt_src_update_slackbuild_cache(config))
+ exit(EXIT_FAILURE);
break;
case FETCH_OPT:
@@ -493,7 +494,7 @@ int main(int argc, char *argv[])
slapt_src_config_free(config);
- return rval;
+ return 0;
}
static int show_summary(slapt_vector_t *sbs, slapt_vector_t *names, int action, bool prompt)