1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Improve bug60602.phpt portability

On NixOS we need to inherit the PATH variable so we can actually resolve the
location of ls.

Closes GH-20206
This commit is contained in:
Ilija Tovilo
2025-10-17 22:39:25 +02:00
parent 02c67b47f7
commit 939b97219d

View File

@@ -9,7 +9,7 @@ $descs = array(
2 => array('pipe', 'w'), // strerr
);
$environment = array('test' => array(1, 2, 3));
$environment = array('test' => array(1, 2, 3), 'PATH' => getenv('PATH'));
$cmd = (substr(PHP_OS, 0, 3) == 'WIN') ? 'dir' : 'ls';
$p = proc_open($cmd, $descs, $pipes, '.', $environment);