Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
return an error in case pkg install <something> found nothing todo
Baptiste Daroussin committed 14 years ago
commit 27c5027141deb375548ff21d60112c80f50ee0ad
parent 0f46b7ea9dd36179ccae50bba7d65d45b57c4100
1 file changed +7 -2
modified pkg/install.c
@@ -121,8 +121,13 @@ exec_install(int argc, char **argv)
	pkgdb_it_free(it);

	if (pkg_jobs_is_empty(jobs)) {
-
		printf("Nothing to do\n");
-
		retcode = 0;
+
		if (argc == 0) {
+
			printf("Nothing to do\n");
+
			retcode = EXIT_SUCCESS;
+
		} else {
+
			fprintf(stderr, "Package(s) not found in the repositories");
+
			retcode = EX_DATAERR;
+
		}
		goto cleanup;
	}