technomancy/leiningen — pull request #1486 by mpblair (2014-04-02 03:34:17+00:00)
Title: Add support for option to force execution of lein new when target directory already exists

Fixes #1467. Added option for ```:force``` or ```--force``` to force execution of the ```lein new``` task when the target directory already exists. Works also if ```--to-dir``` option is specified.

Removed undocumented feature of ```--to-dir```; previously, if the ```--to-dir``` target specified an existing directory, the task would not error out. For consistency, the proposed change requires the ```--force``` option to be used in all cases where the target directory already exists.

Added text to the error message that is displayed when the target directory already exists, and added help text to the ```new``` task.

Added tests for the ```--force``` option, and fixed a broken test (had to add the ```--force``` option since the test attempted to ```mkdir /tmp```