On Thu, May 23, 2013 at 10:05 AM, Adam George <[email protected]> wrote:

> If "task :foo do ..." enhances the "foo" task successfully, then why does
> "task :compile do ..." seemingly not run in addition to the original
> "compile" task?
>

It's a matter of timing.

When using ".tap" the block executes right away (typically while 'parsing'
the buildfile).

When using  "task ... do" the block will execute if/when the task executes
(and after all previously defined logic on the task) so if you're
configuring the task, it's already too late because the gist of the task
execution has already happened.

alex

PS: Yes, the .tap method is the same behavior as Kernel#tap.

Reply via email to