Skip to content

Commit

Permalink
Fix frozen string error
Browse files Browse the repository at this point in the history
  • Loading branch information
root-expert committed Mar 14, 2022
1 parent b52d606 commit 6bd7463
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/puppet/provider/package/pear.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ def install(useversion = true)
command << '--alldeps'
end

pear_pkg = @resource[:source] || @resource[:name]
if !@resource[:ensure].is_a?(Symbol) && useversion
command << '-f'
pear_pkg << "-#{@resource[:ensure]}"
pear_pkg = "#{@resource[:source] || @resource[:name]}-#{@resource[:ensure]}"
else
pear_pkg = @resource[:source] || @resource[:name]
end
command << pear_pkg

Expand Down

0 comments on commit 6bd7463

Please sign in to comment.