Allow php_uname to be disabled, fixes composer/getcomposer.org#112
parent
9ae434cefe
commit
d0e780a8eb
|
@ -159,7 +159,7 @@ class Application extends BaseApplication
|
||||||
Composer::VERSION,
|
Composer::VERSION,
|
||||||
Composer::RELEASE_DATE,
|
Composer::RELEASE_DATE,
|
||||||
defined('HHVM_VERSION') ? 'HHVM '.HHVM_VERSION : 'PHP '.PHP_VERSION,
|
defined('HHVM_VERSION') ? 'HHVM '.HHVM_VERSION : 'PHP '.PHP_VERSION,
|
||||||
php_uname('s') . ' / ' . php_uname('r')
|
function_exists('php_uname') ? php_uname('s') . ' / ' . php_uname('r') : 'Unknown OS'
|
||||||
), true, IOInterface::DEBUG);
|
), true, IOInterface::DEBUG);
|
||||||
|
|
||||||
if (PHP_VERSION_ID < 50302) {
|
if (PHP_VERSION_ID < 50302) {
|
||||||
|
|
|
@ -143,8 +143,8 @@ final class StreamContextFactory
|
||||||
$options['http']['header'][] = sprintf(
|
$options['http']['header'][] = sprintf(
|
||||||
'User-Agent: Composer/%s (%s; %s; %s%s)',
|
'User-Agent: Composer/%s (%s; %s; %s%s)',
|
||||||
Composer::VERSION === '@package_version@' ? 'source' : Composer::VERSION,
|
Composer::VERSION === '@package_version@' ? 'source' : Composer::VERSION,
|
||||||
php_uname('s'),
|
function_exists('php_uname') ? php_uname('s') : 'Unknown',
|
||||||
php_uname('r'),
|
function_exists('php_uname') ? php_uname('r') : 'Unknown',
|
||||||
$phpVersion,
|
$phpVersion,
|
||||||
getenv('CI') ? '; CI' : ''
|
getenv('CI') ? '; CI' : ''
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue