Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Warn user if no repos are enabled.
Vsevolod Stakhov committed 12 years ago
commit 0a108d8e4a5867ae1b95b16a622705fa5c32658d
parent 8cacbb9
1 file changed +5 -1
modified src/update.c
@@ -45,7 +45,7 @@
 */
int
pkgcli_update(bool force) {
-
	int retcode = EPKG_FATAL;
+
	int retcode = EPKG_FATAL, update_count = 0;
	struct pkg_repo *r = NULL;

	/* Only auto update if the user has write access. */
@@ -74,8 +74,12 @@ pkgcli_update(bool force) {
		}
		if (retcode != EPKG_OK)
			break;
+
		update_count ++;
	}

+
	if (!quiet && update_count == 0)
+
		printf("No repositories are enabled\n");
+

	return (retcode);
}