Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Check if we are fetching from a repo before trying to issue a warning regarding the repo
Baptiste Daroussin committed 5 years ago
commit 754a323b848df83ebb8a0e47b33bea13e7fc9aae
parent a43cd46
1 file changed +1 -1
modified libpkg/fetch.c
@@ -223,7 +223,7 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest,
		url += strlen(URL_SCHEME_PREFIX);
		u = fetchParseURL(url);
	} else {
-
		if (repo->mirror_type == SRV && (strncmp(u->scheme, "http", 4) == 0 ||
+
		if (repo != NULL && repo->mirror_type == SRV && (strncmp(u->scheme, "http", 4) == 0 ||
		    strncmp(u->scheme, "ftp", 3) == 0)) {
			pkg_emit_notice(
     "Warning: use of %s:// URL scheme with SRV records is deprecated: "