From d44bc994ce3175068a1f14250f816ac0846c29f2 Mon Sep 17 00:00:00 2001 From: Christos Papageorgiou Date: Sat, 1 Jun 2024 20:14:20 +0300 Subject: [PATCH] fixup! Make provider upgradable; Add logic to correctly switch between channels --- lib/puppet/provider/package/snap.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/puppet/provider/package/snap.rb b/lib/puppet/provider/package/snap.rb index c1e24d0..8776546 100644 --- a/lib/puppet/provider/package/snap.rb +++ b/lib/puppet/provider/package/snap.rb @@ -25,11 +25,7 @@ def self.instances def query installed = self.class.instances.find { |it| it.name == @resource['name'] } - if installed - { ensure: installed[:ensure], name: @resource[:name] } - else - nil - end + { ensure: installed[:ensure], name: @resource[:name] } if installed end def install