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
12 lines
203 B
PHP
12 lines
203 B
PHP
<?php
|
|
|
|
if ( PHP_SAPI !== 'cli' ) {
|
|
exit( 1 );
|
|
}
|
|
|
|
for ( $i = 1; $i < count( $argv ); $i++ ) {
|
|
fprintf( STDOUT, "%s", getenv( $argv[$i] ) );
|
|
|
|
if ( $i + 1 < count( $argv ) )
|
|
fprintf( STDOUT, "\n" );
|
|
}
|