Skip to content

options for init command should have required arguments. #1323

Closed

Description

@jamesgeorge007

Description

Not supplying a value for any of the options available as part of the init command fails.

Reproducible Demo

react-native-cli init app --template

Screenshot 2020-11-23 at 2 15 07 PM

Proposed Solution

error: option `--template <string>' argument missing
     {
-      name: '--version [string]',
+      name: '--version <string>',
       description: 'Shortcut for `--template react-native@version`',
     },
     {
-      name: '--template [string]',
+      name: '--template <string>',
       description:
         'Uses a custom template. Valid arguments are: npm package, absolute directory prefixed with `file://`, Git repository or a tarball',
     },
@@ -21,11 +21,11 @@ export default {
       description: 'Forces using npm for initialization',
     },
     {
-      name: '--directory [string]',
+      name: '--directory <string>',
       description: 'Uses a custom directory instead of `<projectName>`.',
     },
     {
-      name: '--title [string]',
+      name: '--title <string>',
       description: 'Uses a custom app title name for application',
      }

/cc @thymikee

Activity

  1. thymikee commented on Nov 23, 2020

    @thymikee
    Member

    Yup, makes sense

  2. changed the title [-]Options for init command should have required arguments.[/-] [+]options for init command should have required arguments.[/+] on Nov 23, 2020
  3. jamesgeorge007 commented on Nov 26, 2020

    @jamesgeorge007
    ContributorAuthor

    Fixed in #1328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions