From 4b54f497d959273a1621183b95cc82c6597667f8 Mon Sep 17 00:00:00 2001 From: K Lange Date: Thu, 17 Jun 2021 22:14:25 +0900 Subject: [PATCH] msk: handle failures in 'fetch' when retrieving packages --- apps/msk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/msk.c b/apps/msk.c index a7ae3227..caad4547 100644 --- a/apps/msk.c +++ b/apps/msk.c @@ -301,7 +301,10 @@ static int install_package(char * pkg) { char cmd[1024]; sprintf(cmd, "fetch -o /tmp/msk.file -v %s/%s", msk_remote, source); - system(cmd); + int status; + if ((status = system(cmd))) { + return status; + } hashmap_set(hashmap_get(msk_manifest->sections, pkg), "source", "/tmp/msk.file"); } }