File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
cookbooks/fb_launchd/resources Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 4343 fail "fb_launchd: prefix '#{ prefix } ' must not end with a trailing '.'"
4444 end
4545
46+ managed_jobs = FB ::Helpers . evaluate_lazy_enumerable ( node [ 'fb_launchd' ] [ 'jobs' ] . to_hash ) . reject { |_k , v | v . nil? }
47+
4648 # Delete old jobs first.
4749 managed_plists ( prefix ) . each do |path |
4850 label = ::File . basename ( path , '.plist' )
4951 name = label . sub ( prefix + '.' , '' )
50- next if node [ 'fb_launchd' ] [ 'jobs' ] . include? ( name )
52+ next if managed_jobs . include? ( name )
5153
5254 # Delete with 'path' specified to enforce that we delete the right one.
5355 Chef ::Log . debug ( "fb_launchd: deleting #{ label } " )
5456 launchd_resource ( label , :delete , { 'path' => path } )
5557 end
5658
5759 # Set up current jobs.
58- node [ 'fb_launchd' ] [ 'jobs' ] . each do |name , attrs |
60+ managed_jobs . each do |name , attrs |
5961 if attrs . keys . any? { |k | BLOCKLISTED_ATTRIBUTES . include? ( k ) }
6062 fail "fb_launchd[#{ name } ]: uses a blocklisted attribute (one of " +
6163 "#{ BLOCKLISTED_ATTRIBUTES } ). If you want to use them, create a " +
You can’t perform that action at this time.
0 commit comments