diff options
author | mat <mat@FreeBSD.org> | 2016-06-04 17:35:21 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2016-06-04 17:35:21 +0800 |
commit | a8e13e0172f86f884687ee9108f3eb45b3ac136a (patch) | |
tree | e66b99283a54a59db769db0a294bd0c847e55f49 /Mk | |
parent | df723a921b7e1e36785f93804717cac6298adeec (diff) | |
download | freebsd-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.sh | 16 |
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 |