Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Composer/Util/GitHub.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public function authorizeOAuthInteractively($originUrl, $message = null)
$this->io->writeError(sprintf('Tokens will be stored in plain text in "%s" for future use by Composer.', $this->config->getAuthConfigSource()->getName()));
$this->io->writeError('For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth');

$token = trim($this->io->askAndHideAnswer('Token (hidden): '));
$token = trim((string) $this->io->askAndHideAnswer('Token (hidden): '));

if (!$token) {
if ($token === '') {
$this->io->writeError('<warning>No token given, aborting.</warning>');
$this->io->writeError('You can also add it manually later by using "composer config --global --auth github-oauth.github.com <token>"');

Expand Down