Fork me on GitHub
#leiningen
<
2016-09-22
>
eyelidlessness04:09:34

using composite profiles (i.e. [:dev {...}]), if i specify :target-path "docs/0.5.1" or :clean-targets ^{:protect false} [:target-path "docs/0.5.1"], I get the following error:

Deleting non-target project paths ["/.../docs/0.5.1%s"] is not allowed.
Check :clean-targets or override this behavior by adding metadata ->
  :clean-targets ^{:protect false} [...targets...]
Error encountered performing task 'clean' with profile(s): 'dev-051'
Deleting non-target project paths ["/.../docs/0.5.1%s"] is not allowed.
Check :clean-targets or override this behavior by adding metadata ->
  :clean-targets ^{:protect false} [...targets...]

eyelidlessness04:09:34

i don't really know how to proceed, other than to manually remove the build directories

eyelidlessness04:09:14

i've started to suspect there's something special about the name "docs", because i only just renamed the directory from "examples" (which cleaned fine), when i started investigating deploying my (cljs) build with github pages

eyelidlessness15:09:05

for anyone wondering, i narrowed this down to having an entry in :aliases cleaning all profiles using lein with-profile every,single,profile clean

eyelidlessness15:09:21

i was able to work around it by using lein do ..., which is more verbose but at least it works

eyelidlessness15:09:36

i suspect that whatever leiningen uses to compose profiles is not preserving the ^{:protect false} metadata