Option to disable inclusion of hostname in OAuth app name
parent
4ebc5c9a08
commit
bddba72e13
|
@ -39,6 +39,7 @@ class Config
|
||||||
'optimize-autoloader' => false,
|
'optimize-autoloader' => false,
|
||||||
'prepend-autoloader' => true,
|
'prepend-autoloader' => true,
|
||||||
'github-domains' => array('github.com'),
|
'github-domains' => array('github.com'),
|
||||||
|
'github-expose-hostname' => true,
|
||||||
'store-auths' => 'prompt',
|
'store-auths' => 'prompt',
|
||||||
// valid keys without defaults (auth config stuff):
|
// valid keys without defaults (auth config stuff):
|
||||||
// github-oauth
|
// github-oauth
|
||||||
|
|
|
@ -97,8 +97,10 @@ class GitHub
|
||||||
|
|
||||||
// build up OAuth app name
|
// build up OAuth app name
|
||||||
$appName = 'Composer';
|
$appName = 'Composer';
|
||||||
if (0 === $this->process->execute('hostname', $output)) {
|
if ($this->config->get('github-expose-hostname') === true && 0 === $this->process->execute('hostname', $output)) {
|
||||||
$appName .= ' on ' . trim($output);
|
$appName .= ' on ' . trim($output);
|
||||||
|
} else {
|
||||||
|
$appName .= ' [' . date('YmdHis') . ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
$headers = array();
|
$headers = array();
|
||||||
|
|
Loading…
Reference in New Issue