Skip to content

Commit 10e2ae7

Browse files
schlesseraclaude
andcommitted
Keep launched processes in the temporary directory of their worker
The processes launched by the tests only received TEMP and TMP, not TMPDIR, so they used the system's temporary directory even when the tests ran in a parallel worker with its own. WordPress saves downloads there under names taken from the response, such as twentytwelve.4.9.zip, so workers installing the same theme at the same time could remove each other's download. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 06ba598 commit 10e2ae7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/Context/FeatureContext.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,9 @@ private static function get_process_env_variables(): array {
481481

482482
$env = array_merge( $_ENV, $env );
483483

484-
foreach ( [ 'TEMP', 'TMP', 'SystemRoot', 'windir' ] as $key ) {
484+
// Keep the launched processes in the same temporary directory as the tests, which differs per
485+
// parallel worker. WordPress saves downloads under fixed names there, which would clash otherwise.
486+
foreach ( [ 'TMPDIR', 'TEMP', 'TMP', 'SystemRoot', 'windir' ] as $key ) {
485487
$value = getenv( $key );
486488
if ( false !== $value ) {
487489
$env[ $key ] = $value;

0 commit comments

Comments
 (0)