summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/apk.c b/src/apk.c
index f5f6f13..cb039d1 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -291,6 +291,7 @@ int main(int argc, char **argv)
struct apk_repository_list *repo = NULL;
struct apk_database db;
struct apk_db_options dbopts;
+ struct apk_string_array *args;
#ifdef TEST_MODE
const char *test_installed_db = NULL;
const char *test_world = NULL;
@@ -495,7 +496,11 @@ int main(int argc, char **argv)
}
#endif
- r = applet->main(ctx, &db, argc, argv);
+ apk_string_array_init(&args);
+ apk_string_array_resize(&args, argc);
+ memcpy(args->item, argv, argc * sizeof(*argv));
+
+ r = applet->main(ctx, &db, args);
apk_db_close(&db);
if (r == -EINVAL)