-
Enhancement
-
Resolution: Done
-
Minor
-
1.0.0.Beta3
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]