1
0
Fork 0

Use process executor instead of exec to run git config

pull/1241/head
Wes Mason 2012-10-21 10:05:56 +01:00
parent 1442c1e026
commit 5fb0403276
1 changed files with 1 additions and 3 deletions

View File

@ -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;