add: print an error about malformed arguments

cute-signatures
Timo Teräs 2012-01-06 13:40:55 +02:00
parent 09b28210a2
commit 23c39085ce
1 changed files with 4 additions and 1 deletions

View File

@ -109,8 +109,11 @@ 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) {