Commit 23c39085 authored by Timo Teräs's avatar Timo Teräs

add: print an error about malformed arguments

parent 09b28210
......@@ -109,9 +109,12 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv)
} else {
apk_blob_t b = APK_BLOB_STR(argv[i]);
apk_blob_pull_dep(&b, db, &dep);
if (APK_BLOB_IS_NULL(b))
if (APK_BLOB_IS_NULL(b)) {
apk_error("'%s' is not a valid dependency, format is name(@tag)([<>=]version)",
argv[i]);
return -1;
}
}
if (virtpkg == NULL) {
apk_deps_add(&world, &dep);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment