Browse Source

Fix loop and add missing options

Jordi Boggiano 12 years ago
parent
commit
116b822953
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/Composer/Repository/ComposerRepository.php

+ 3 - 1
src/Composer/Repository/ComposerRepository.php

@@ -279,7 +279,7 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
         $retries = 3;
         while ($retries--) {
             try {
-                $json = new JsonFile($filename, new RemoteFilesystem($this->io));
+                $json = new JsonFile($filename, new RemoteFilesystem($this->io, $this->options));
                 $data = $json->read();
                 $this->cache->write($cacheKey, json_encode($data));
 
@@ -292,6 +292,8 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
                     }
                     $this->degradedMode = true;
                     $data = json_decode($contents, true);
+
+                    break;
                 } elseif (!$retries) {
                     throw $e;
                 }