From a9c0134378bf5c0d537fa3edd9b78acb8c1278de Mon Sep 17 00:00:00 2001 From: Graham Daniels Date: Mon, 3 Apr 2017 18:12:29 -0400 Subject: [PATCH] make use of variable --- src/Composer/Command/RequireCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Command/RequireCommand.php b/src/Composer/Command/RequireCommand.php index 2eefac029..354c661ad 100644 --- a/src/Composer/Command/RequireCommand.php +++ b/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(''.$file.' could not be created.'); return 1;