소스 검색

Merge pull request #6320 from greydnls/make-use-of-variabe

Cleanup: make use of variable
Jordi Boggiano 8 년 전
부모
커밋
3642fe63b2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Composer/Command/RequireCommand.php

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

@@ -74,7 +74,7 @@ EOT
         $io = $this->getIO();
 
         $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>');
 
             return 1;