1
0
Fork 0

Avoid warnings due to duplicate loading of auth files, fixes #4971

pull/4993/head
Jordi Boggiano 2016-03-02 14:10:21 +00:00
parent 9d95456bb0
commit 6d1e8ebf90
1 changed files with 5 additions and 0 deletions

View File

@ -65,6 +65,11 @@ abstract class BaseIO implements IOInterface
protected function checkAndSetAuthentication($repositoryName, $username, $password = null)
{
if ($this->hasAuthentication($repositoryName)) {
$auth = $this->getAuthentication($repositoryName);
if ($auth['username'] === $username && $auth['password'] === $password) {
return;
}
$this->writeError(
sprintf(
"<warning>Warning: You should avoid overwriting already defined auth settings for %s.</warning>",