Skip to content

Commit 718fc4c

Browse files
committed
Use IS_WINDOWS
1 parent 10c420f commit 718fc4c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

run-tests.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2109,11 +2109,7 @@ function run_test($php, $file, $env)
21092109
if (array_key_exists('INI', $section_text)) {
21102110
$section_text['INI'] = str_replace('{PWD}', dirname($file), $section_text['INI']);
21112111
$section_text['INI'] = str_replace('{TMP}', sys_get_temp_dir(), $section_text['INI']);
2112-
if (PHP_OS_FAMILY === 'Windows') {
2113-
$replacement = '"' . PHP_BINARY . ' -r \"while ($in = fgets(STDIN)) echo $in;\" > $1"';
2114-
} else {
2115-
$replacement = 'tee $1 >/dev/null';
2116-
}
2112+
$replacement = IS_WINDOWS ? '"' . PHP_BINARY . ' -r \"while ($in = fgets(STDIN)) echo $in;\" > $1"' : 'tee $1 >/dev/null';
21172113
$section_text['INI'] = preg_replace('/{MAIL:(\S+)}/', $replacement, $section_text['INI']);
21182114
settings2array(preg_split("/[\n\r]+/", $section_text['INI']), $ini_settings);
21192115
}

0 commit comments

Comments
 (0)