[chef-dev] Re: Re: Re: Re: Re: Re: Re: ::File notation


Chronological Thread 
  • From: Daniel DeLeo < >
  • To: Noah Kantrowitz < >
  • Cc: Andrea Campi < >, Scott Sanders < >, Akzhan Abdulin < >, Mike < >, Avishai Ish-Shalom < >, Chef Dev < >
  • Subject: [chef-dev] Re: Re: Re: Re: Re: Re: Re: ::File notation
  • Date: Tue, 16 Apr 2013 14:04:41 -0700


On Tuesday, April 16, 2013 at 1:57 PM, Noah Kantrowitz wrote:

Now that you mention it, yeah, I think we used to use Chef::Resource as the scope for recipe code but now it runs in its own thang so you might well have a point :)

--Noah
The block you pass to a resource is evaluated through instance_eval on the resource object, so the context depends on whether you're inside that block or not.

I think the biggest pain point is doing something like `File.exist?("/path/thing.ext")` inside a not_if/only_if block, and I believe that's still affected.


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§