Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
\Drupal\Tests\Composer\Plugin\Scaffold\Functional\ManageGitIgnoreTest::testUnmanagedGitIgnoreWhenGitNotAvailable()
uses core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/scripts/disable-git-bin/git
to disable git. It's a pretty odd to have test chmod a file that we keep in git. It makes hard to ensure this file is kept as 644 as it should be. Currently it is 755 in git.
Steps to reproduce
ls -lah core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/scripts/disable-git-bin/git Thu 7 Oct 13:09:45 2021
-rwxr-xr-x 1 alex admin 21B 7 Oct 13:03 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/scripts/disable-git-bin/git*
Proposed resolution
Don't store this script as a file. Write the file out ourselves in the test.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3241318-2.patch | 1.46 KB | alexpott |
Comments
Comment #2
alexpottComment #3
andypost++ to security, wil buggy Apache 2.4.49 it could be serious
Comment #4
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedI'm not sure why the chmod is done at all, since +x is a mode that git can track. I agree that the proposed solution is better, though.
Comment #6
andypostflacky test
Comment #9
catchCommitted/pushed to 9.3.x and cherry-picked to 9.2.x, thanks!