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

Commit 5f1e88a

Browse files
authored
Making security test failure more verbose. (#231)
* Improving Drupal Scaffold docs. * Making security test failure more verbose.
1 parent e4788ea commit 5f1e88a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
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>

template/readme/project-tasks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Note that Composer versioning is not identical to drupal.org versioning. See:
4444

4545
Drupal core files can be grouped into two categories: those that are within the `docroot/core` directory, and those that are directly within the `docroot` directory (scaffold files).
4646

47-
Scaffold files are automatically updated via the `drupal-composer/drupal-scaffold library`, which hooks into the `composer update` and `composer install` commands. If you would like to exclude any scaffold files from automated updates, see the [Drupal Scaffold configuration documentation](https://github.com/drupal-composer/drupal-scaffold#configuration). All other core files are updated in normal composer fashion.
47+
Scaffold files are automatically updated via the `drupal-composer/drupal-scaffold library`, which hooks into the `composer update` and `composer install` commands. If you would like to exclude any scaffold files from automated updates (e.g., .htaccess or robots.txt), see the [Drupal Scaffold configuration documentation](https://github.com/drupal-composer/drupal-scaffold#configuration). All other core files are updated in normal composer fashion.
4848

4949
To update all drupal core files (scaffold and non-scaffold):
5050

0 commit comments

Comments
 (0)