Let's say we have:
task :something => [:something_else] do
# some of stuff
end
task :something_else do
# some verbose stuff
# some quiet stuff
end
Now I want something_else
to do the verbose stuff when called from the shell (rake something_else
) and the silent ones when called as a dependency to rake something
.
i think it might be a better idea to work with parameters or different tasks instead.
one thing that you could do is look for top-level task like that:
You could look what was passed to ARGV. For example: