Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-385

Current directory is poor default for new-project location when existing project is detected

      When creating a new project using the new-project command, forge will offer the current directory as the target location if a project with the same name is found.

      $ new-project --named example --topLevelPackage org.example
      ***ERROR*** [/home/dallen/example] already contains a project; please use a different folder.
      
      Where would you like to create the project? [Press ENTER to use the current directory: dallen]
      

      This default is a recipe for disaster. If there is a project in the way, then using the current directory puts that project in the project being created. Additionally, if the current directory is $HOME, then the project will get overlaid in a directory which has many other files and directories.

      A better default is to append a number to the end of the project name. For example:

      $ new-project --named example --topLevelPackage org.example
      ***ERROR*** [/home/dallen/example] already contains a project; please use a different folder.
      
      Where would you like to create the project? [Press ENTER to use an alternative directory: example2]
      

              lincolnthree Lincoln Baxter III (Inactive)
              dan.j.allen Dan Allen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: