I have Ubuntu 16.04 with chef-client 14.1.1.
I have two steps with contrary conditions but both are run (spoiler: that folder is empty)
docker_container "build_packages" do
....
only_if { ::Dir.empty?('/opt/chef/deb/') }
end
bash 'publish new deb package' do
....
not_if { ::Dir.empty?('/opt/chef/deb/') }
end
Why is it happening?