Преглед изворни кода

RequireCommand - check if composer.json is writable

Bilal Amarni пре 12 година
родитељ
комит
ae9a001053
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      src/Composer/Command/RequireCommand.php

+ 5 - 0
src/Composer/Command/RequireCommand.php

@@ -64,6 +64,11 @@ EOT
 
             return 1;
         }
+        if (!is_writable($file)) {
+            $output->writeln('<error>'.$file.' is not writable.</error>');
+
+            return 1;
+        }
 
         $dialog = $this->getHelperSet()->get('dialog');