aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-06-04 17:35:21 +0800
committermat <mat@FreeBSD.org>2016-06-04 17:35:21 +0800
commita8e13e0172f86f884687ee9108f3eb45b3ac136a (patch)
treee66b99283a54a59db769db0a294bd0c847e55f49 /Mk
parentdf723a921b7e1e36785f93804717cac6298adeec (diff)
downloadfreebsd-ports-graphics-a8e13e0172f86f884687ee9108f3eb45b3ac136a.tar.gz
freebsd-ports-graphics-a8e13e0172f86f884687ee9108f3eb45b3ac136a.tar.zst
freebsd-ports-graphics-a8e13e0172f86f884687ee9108f3eb45b3ac136a.zip
Fix logic a bit, in case pkg is not installed (I guess.)
PR: 209754 Reported by: Nick Evans Sponsored by: Absolight
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Scripts/check-vulnerable.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/Mk/Scripts/check-vulnerable.sh b/Mk/Scripts/check-vulnerable.sh
index 29af7ee3c94..6ddf6d68b00 100644
--- a/Mk/Scripts/check-vulnerable.sh
+++ b/Mk/Scripts/check-vulnerable.sh
@@ -24,14 +24,12 @@ if [ -x "${dp_PKG_BIN}" ]; then
vlist=$(${dp_PKG_BIN} audit "${dp_PKGNAME}" || :)
if [ "${vlist}" = "0 problem(s) in the installed packages found." ]; then
vlist=""
+ else
+ ${dp_ECHO_MSG} "===> ${dp_PKGNAME} has known vulnerabilities:"
+ ${dp_ECHO_MSG} "$vlist"
+ ${dp_ECHO_MSG} "=> Please update your ports tree and try again."
+ ${dp_ECHO_MSG} "=> Note: Vulnerable ports are marked as such even if there is no update available."
+ ${dp_ECHO_MSG} "=> If you wish to ignore this vulnerability rebuild with 'make DISABLE_VULNERABILITIES=yes'"
+ exit 1
fi
fi
-
-if [ -n "$vlist" ]; then
- ${dp_ECHO_MSG} "===> ${dp_PKGNAME} has known vulnerabilities:"
- ${dp_ECHO_MSG} "$vlist"
- ${dp_ECHO_MSG} "=> Please update your ports tree and try again."
- ${dp_ECHO_MSG} "=> Note: Vulnerable ports are marked as such even if there is no update available."
- ${dp_ECHO_MSG} "=> If you wish to ignore this vulnerability rebuild with 'make DISABLE_VULNERABILITIES=yes'"
- exit 1
-fi