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::RELEASE_DATE,
|
||||
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);
|
||||
|
||||
if (PHP_VERSION_ID < 50302) {
|
||||
|
|
|
@ -143,8 +143,8 @@ final class StreamContextFactory
|
|||
$options['http']['header'][] = sprintf(
|
||||
'User-Agent: Composer/%s (%s; %s; %s%s)',
|
||||
Composer::VERSION === '@package_version@' ? 'source' : Composer::VERSION,
|
||||
php_uname('s'),
|
||||
php_uname('r'),
|
||||
function_exists('php_uname') ? php_uname('s') : 'Unknown',
|
||||
function_exists('php_uname') ? php_uname('r') : 'Unknown',
|
||||
$phpVersion,
|
||||
getenv('CI') ? '; CI' : ''
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue