Replace deprecated File.exists?

File.exists? was deprecated in Ruby 2.1 and was removed in Ruby 3.2, in
favor of File.exist? .

Change-Id: I16b3a33e2838a56326ec7110916727a19e3e78da
(cherry picked from commit 3792ec0aa2)
This commit is contained in:
Takashi Kajinami
2025-04-06 23:09:11 +09:00
parent 9986ea278e
commit feb0a47e56

View File

@@ -118,7 +118,7 @@ Puppet::Type.type(:vs_port).provide(
def bonding?
# To do: replace with iproute2 commands
if File.exists?("/proc/net/bonding/#{@resource[:port]}")
if File.exist?("/proc/net/bonding/#{@resource[:port]}")
return true
else
return false