mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-10-04 07:48:47 +00:00
Exit early when listing installable bundles
It is not necessary to go through the whole swupd initiation process a second time when listing bundles from the server. This also allows us to set the correct exit status on the early exit. Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
This commit is contained in:
+4
-1
@@ -75,7 +75,10 @@ static bool parse_options(int argc, char **argv)
|
||||
print_help(argv[0]);
|
||||
exit(EXIT_SUCCESS);
|
||||
case 'a':
|
||||
return list_installable_bundles();
|
||||
/* Exit early, we do not need to init swupd locally just to get a
|
||||
* list from the server
|
||||
* list_installable_bundles will supply the exit status */
|
||||
exit(list_installable_bundles());
|
||||
break;
|
||||
case 'u':
|
||||
if (!optarg) {
|
||||
|
||||
Reference in New Issue
Block a user