Browse Source

Allow skipping author, fixes #4969

Jordi Boggiano 9 years ago
parent
commit
b9a3ef73c0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/Composer/Command/InitCommand.php

+ 5 - 1
src/Composer/Command/InitCommand.php

@@ -174,6 +174,7 @@ EOT
                 // package names must be in the format foo/bar
                 $name = $name . '/' . $name;
             }
+            $name = strtolower($name);
         } else {
             if (!preg_match('{^[a-z0-9_.-]+/[a-z0-9_.-]+$}', $name)) {
                 throw new \InvalidArgumentException(
@@ -217,8 +218,11 @@ EOT
 
         $self = $this;
         $author = $io->askAndValidate(
-            'Author [<comment>'.$author.'</comment>]: ',
+            'Author [<comment>'.$author.'</comment>, n to skip]: ',
             function ($value) use ($self, $author) {
+                if ($value === 'n' || $value === 'no') {
+                    return;
+                }
                 $value = $value ?: $author;
                 $author = $self->parseAuthorString($value);