Bladeren bron

make use of variable

Graham Daniels 8 jaren geleden
bovenliggende
commit
a9c0134378
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      src/Composer/Command/RequireCommand.php

+ 1 - 1
src/Composer/Command/RequireCommand.php

@@ -74,7 +74,7 @@ EOT
         $io = $this->getIO();
         $io = $this->getIO();
 
 
         $newlyCreated = !file_exists($file);
         $newlyCreated = !file_exists($file);
-        if (!file_exists($file) && !file_put_contents($file, "{\n}\n")) {
+        if ($newlyCreated && !file_put_contents($file, "{\n}\n")) {
             $io->writeError('<error>'.$file.' could not be created.</error>');
             $io->writeError('<error>'.$file.' could not be created.</error>');
 
 
             return 1;
             return 1;