Skip to content

Commit

Permalink
Stop using File.exists? which no longer works in Ruby 3.2 (bsc#1206419)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner authored and jreidinger committed Sep 8, 2023
1 parent 620dcba commit aa06068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/Sudo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def Write
# Error message
if !WriteSudoSettings2()
msg = _("Cannot write settings.")
if ::File.exists?("/etc/sudoers.YaST2.new") # if file exists it is invalid syntax
if ::File.exist?("/etc/sudoers.YaST2.new") # if file exists it is invalid syntax
res = SCR.Execute(path(".target.bash_output"), "/usr/sbin/visudo -cf /etc/sudoers.YaST2.new")
msg += _("\nSyntax error in target file. See /etc/sudoers.YaST2.new.\nDetails: ") + res["stdout"]
end
Expand Down

0 comments on commit aa06068

Please sign in to comment.