technomancy/leiningen — pull request #1691 by hyPiRion (2014-09-13 23:28:27+00:00)
Title: Fix erroneous shell command form, fixes #1683.

I'll document this here in case anyone wonder how the internal works or if it pops up again:

When you enable fast trampoline, *all* tasks hashes the lein version, project map and the input command into a checksum which will always be used as part of subcommand filenames. Leiningen creates the file `target/active-profiles/$CHECKSUM-init.clj` which is used to store the Clojure form to evaluate (I'll call it the form file onwards).

In addition (when fast trampoline is set), trampoline writes the file `target/trampolines/$CHECKSUM` (the trampoline file). That file contains the java command and args to invoke, including the form file described in previous paragraph. The problem is that the command will always crash if the form file doesn't exist (#1683).

4b6eb01cf117b96a19136006cac973322f8f1d4f fixes #1562 because the previous implementation ended up appending data on existing form files for non-trampoline tasks when LEIN_FAST_TRAMPOLINE was set. The problem was that the LEIN_FAST_TRAMPOLINE check should have been negated instead.