Solid logic


On Mon, Mar 17, 2014 at 5:03 PM, Bryan McLellan <notifications@github.com>wrote:

> In providers/printer_driver.rb:
>
> > +    end
> > +    Chef::Log.info("#{ new_resource.name } installed.")
> > +    new_resource.updated_by_last_action(true)
> > +  end
> > +end
> > +
> > +action :remove do
> > +  if driver_exists?
> > +    windows_batch "Deleting print driver: #{ new_resource.name }" do
> > +      code "rundll32 printui.dll PrintUIEntry /dd /m \"#{ new_resource.name}\" /h \"#{new_resource.environment }\""
> > +    end
> > +    Chef::Log.info("#{ new_resource.name } uninstalled.")
> > +    new_resource.updated_by_last_action(true)
> > +  else
> > +    Chef::Log.info("#{ new_resource.name } doesn't exist - can't delete.")
> > +    new_resource.updated_by_last_action(false)
>
> I'm pretty sure we presume that we didn't update the resource
> (updated_by_last_action) by default, so you don't have to specify false
> when you don't do anything.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/opscode-cookbooks/windows/pull/61/files#r10681201>
> .
>