Browse Source

Suppress errors from mkdir calls that are checked for failure

Jordi Boggiano 12 years ago
parent
commit
27898c4c31

+ 1 - 1
src/Composer/Json/JsonFile.php

@@ -108,7 +108,7 @@ class JsonFile
                     $dir.' exists and is not a directory.'
                 );
             }
-            if (!mkdir($dir, 0777, true)) {
+            if (!@mkdir($dir, 0777, true)) {
                 throw new \UnexpectedValueException(
                     $dir.' does not exist and could not be created.'
                 );

+ 1 - 1
src/Composer/Util/Filesystem.php

@@ -108,7 +108,7 @@ class Filesystem
                     $directory.' exists and is not a directory.'
                 );
             }
-            if (!mkdir($directory, 0777, true)) {
+            if (!@mkdir($directory, 0777, true)) {
                 throw new \RuntimeException(
                     $directory.' does not exist and could not be created.'
                 );

+ 1 - 1
tests/Composer/Test/Repository/VcsRepositoryTest.php

@@ -39,7 +39,7 @@ class VcsRepositoryTest extends \PHPUnit_Framework_TestCase
 
             return;
         }
-        if (!mkdir(self::$gitRepo) || !chdir(self::$gitRepo)) {
+        if (!@mkdir(self::$gitRepo) || !@chdir(self::$gitRepo)) {
             $this->skipped = 'Could not create and move into the temp git repo '.self::$gitRepo;
 
             return;