소스 검색

Merge pull request #4659 from mishak87/patch-1

Could not configure gitlab-oauth via CLI #3765
Rob 9 년 전
부모
커밋
dc5f8cfbaa
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Composer/Config/JsonConfigSource.php

+ 2 - 2
src/Composer/Config/JsonConfigSource.php

@@ -79,7 +79,7 @@ class JsonConfigSource implements ConfigSourceInterface
     public function addConfigSetting($name, $value)
     {
         $this->manipulateJson('addConfigSetting', $name, $value, function (&$config, $key, $val) {
-            if (preg_match('{^(github-oauth|http-basic|platform)\.}', $key)) {
+            if (preg_match('{^(gitlab-oauth|github-oauth|http-basic|platform)\.}', $key)) {
                 list($key, $host) = explode('.', $key, 2);
                 if ($this->authConfig) {
                     $config[$key][$host] = $val;
@@ -98,7 +98,7 @@ class JsonConfigSource implements ConfigSourceInterface
     public function removeConfigSetting($name)
     {
         $this->manipulateJson('removeConfigSetting', $name, function (&$config, $key) {
-            if (preg_match('{^(github-oauth|http-basic|platform)\.}', $key)) {
+            if (preg_match('{^(gitlab-oauth|github-oauth|http-basic|platform)\.}', $key)) {
                 list($key, $host) = explode('.', $key, 2);
                 if ($this->authConfig) {
                     unset($config[$key][$host]);