Buildr's packaging tasks are built such if you write
Code Block |
---|
packages.first.enhance do |task| puts File.exist?(task.name) end |
it will print false
(That is, your code is executed before the package is actually created.) This is so that you can enhance the task to, e.g., add or remove files from archive.
This is different from how enhance usually behaves — usually the enhance block is executed after the existing defined behavior of the task. If you want the normal behavior, enhance twice:
Code Block |
---|
packages.first.enhance do |task| task.enhance do puts File.exist?(task.name) # prints true end end |