summaryrefslogtreecommitdiff
path: root/src/add.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-01-06 13:40:55 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-01-06 13:40:55 +0200
commit23c39085ce3b2ac80b4c643d1a0855cfdcd91c35 (patch)
tree0bf68f005d5f68704ed40fbbfdc3f9092ac2adcf /src/add.c
parent09b28210a221c76391f115b72b39912a84db98dd (diff)
downloadapk-tools-23c39085ce3b2ac80b4c643d1a0855cfdcd91c35.tar.gz
apk-tools-23c39085ce3b2ac80b4c643d1a0855cfdcd91c35.tar.bz2
apk-tools-23c39085ce3b2ac80b4c643d1a0855cfdcd91c35.tar.xz
apk-tools-23c39085ce3b2ac80b4c643d1a0855cfdcd91c35.zip
add: print an error about malformed arguments
Diffstat (limited to 'src/add.c')
-rw-r--r--src/add.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/add.c b/src/add.c
index a31c9e2..5980605 100644
--- a/src/add.c
+++ b/src/add.c
@@ -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) {