Fixes executable paths with spaces in them, argument escapes, and other strange behavior in Windows. Also, fixes some shell tests on Windows. This is done by using PHP scripts instead of native POSIX executables like "cat". Behavior should be exactly the same on non-Windows servers. Bug: T183759 Change-Id: I2367a6c47e3774bf4fabfa8c66e4bc4c5c8a714a
10 lines
174 B
PHP
10 lines
174 B
PHP
<?php
|
|
|
|
if ( PHP_SAPI !== 'cli' ) {
|
|
exit( 1 );
|
|
}
|
|
|
|
file_put_contents( "php://stdout", $argv[1] );
|
|
if ( isset( $argv[2] ) ) {
|
|
file_put_contents( "php://stderr", $argv[2] );
|
|
}
|