buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Moore <rp.andrew.mo...@gmail.com>
Subject Re: Task name which called a method
Date Fri, 29 Jan 2010 16:25:09 GMT

Thanks for the quick response...

I'm wanting to try and figure out the task name from within a method called
from the task as opposed to within the task itself. 

I had hoped there would be some sort of callstack or scope kept by buildr or
something I could tap into to get that information while within the
print_task_name method. In my real-world example I'm doing some other system
calls, testing the result and hoping to fail the build with a message that
has the task name in it. It sounds like I would have to add the '|t|' to
each task and pass it into each method call. I was hoping to avoid doing
that for every task and call to my method (keeping it a bit DRYer).

Any other thoughts?

~ Andrew
-- 
View this message in context: http://n2.nabble.com/Task-name-which-called-a-method-tp4480710p4480843.html
Sent from the Apache Buildr - User mailing list archive at Nabble.com.

Mime
View raw message