Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem
Drupal\system\Tests\System\ScriptTest
usesexec('core/scripts/password-hash.sh)
, which assumes that#!/bin/env php
is a thing. Executing this test on Windows starts two instances of my file/code editor with the specified files.- Due to the separate PHP process, the scripts are executed against the parent site.
Comment | File | Size | Author |
---|---|---|---|
#8 | test.scripts.8.patch | 6.56 KB | sun |
#5 | interdiff.txt | 1.89 KB | sun |
#5 | test.scripts.5.patch | 7.07 KB | sun |
#1 | test.scripts.1.patch | 7.19 KB | sun |
Comments
Comment #1
sunAttached patch fixes the mess.
Comment #2
BerdirNot sure we have to remove this, with it, you can execute it both with php file and ./file.
Comment #3
sunThe
#!/usr/bin/env php
approach and false-exposure of a PHP script as a shell script has caused us more problems than it resolves. (There are a bunch of issues in the queue.)We should stop doing that. It's just reasonable and not too much to ask to execute a PHP script via
$ php scriptname.php
Comment #4
alexpott@sun re #3 is this in scope and necessary to fix this?
Comment #5
sunRenamed scripts back to .sh.
Comment #6
sun5: test.scripts.5.patch queued for re-testing.
Comment #8
sunComment #9
ParisLiakos CreditAttribution: ParisLiakos commentedi do not understand why we have to remove this functionality?
Comment #10
sun@ParisLiakos: It's no longer needed. autoload.php and bootstrap.inc are included in the same way as in the other scripts.
Comment #11
ParisLiakos CreditAttribution: ParisLiakos commentedah, correct, thanks!
Before this patch:
After this patch
Code looks coode, thus RTBC
Comment #13
ParisLiakos CreditAttribution: ParisLiakos commented8: test.scripts.8.patch queued for re-testing.
Comment #14
ParisLiakos CreditAttribution: ParisLiakos commentedtestbot fluke
Comment #16
Dries CreditAttribution: Dries commentedLooks good but couldn't test it on Windows. Committed to 8.x because it ships with tests. Thanks.