Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 85be4b6

Browse files
committed
Making security test failure more verbose.
1 parent 0f0f831 commit 85be4b6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

template/build/core/phing/tasks/tests.xml

+9-1
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,21 @@
132132
</target>
133133

134134
<!-- Ensure Drupal doesn't have any modules requiring security updates. -->
135-
<!-- Intentionally removed checkreturn="true" so that this does not cause failure. -->
136135
<target name="tests:security-updates"
137136
description="Check local Drupal installation for security updates.">
138137
<exec dir="${docroot}"
139138
command="! ${drush.cmd} -n ups --check-disabled --security-only 2>/dev/null | grep 'SECURITY UPDATE'"
140139
checkreturn="true"
141140
logoutput="true"
141+
returnProperty="securityPass"
142142
passthru="true"/>
143+
144+
<!-- Output message on failure. -->
145+
<if>
146+
<not><equals arg1="${securityPass}" arg2="0"/></not>
147+
<then>
148+
<echo>One or more of your dependency has an outstanding security update. Please apply update(s) immediately. Failing build.</echo>
149+
</then>
150+
</if>
143151
</target>
144152
</project>

0 commit comments

Comments
 (0)