Use process executor instead of exec to run git config
parent
1442c1e026
commit
5fb0403276
|
@ -351,9 +351,7 @@ class GitHubDriver extends VcsDriver
|
||||||
protected function authorizeOAuth()
|
protected function authorizeOAuth()
|
||||||
{
|
{
|
||||||
// If available use token from git config
|
// If available use token from git config
|
||||||
exec('git config github.accesstoken', $output, $returnCode);
|
if (0 === $this->process->execute('git config github.accesstoken', $output)) {
|
||||||
if ($returnCode === 0 && !empty($output[0]))
|
|
||||||
{
|
|
||||||
$this->io->write('Using Github OAuth token stored in git config (github.accesstoken)');
|
$this->io->write('Using Github OAuth token stored in git config (github.accesstoken)');
|
||||||
$this->io->setAuthorization($this->originUrl, $output[0], 'x-oauth-basic');
|
$this->io->setAuthorization($this->originUrl, $output[0], 'x-oauth-basic');
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue