Alexey Orlov
Alexey Orlov

Reputation: 2804

Clojure: leiningen (--force) and git interaction

Suppose I have a (leiningen) project tree created by git clone. This may be a subset of a project created via lein new template, which is perfectly legitimate. There is a --force option to roll a lein project over a suitable source tree already in place -- or so I presume. I tried it, something like this:

$ lein new app alfa --force

It replaced all the source files with the template stubs. What am I getting wrong?

The seminal discussion: issue #1467

Upvotes: 2

Views: 174

Answers (1)

pwnyexpress
pwnyexpress

Reputation: 1016

You're not getting anything wrong here, this is the way the force option works. If your project already contains some subset of files and folders for a leiningen project, then they will be overwritten if they already exist in the project directory. This seems like conventional behavior considering the task that is being run is called "new." It's operating under the assumption that this is indeed a new project, but with a directory already created.

Upvotes: 1

Related Questions