Browse Source

Merge pull request #3272 from PeterUpfold/ruby3.2-production-rake-exists

replace File:Class `exists?` with `exist?`
Akinori MUSHA 1 year ago
parent
commit
71cf6b4d99
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/tasks/production.rake

+ 2 - 2
lib/tasks/production.rake

@@ -14,7 +14,7 @@ def runit_installed
 end
 
 def remove_upstart_config
-  return true unless File.exists?('/etc/init/huginn.conf')
+  return true unless File.exist?('/etc/init/huginn.conf')
   puts "#{failed} Please stop huginn and remove the huginn upstart init scripts:\n\n"
   puts "sudo stop huginn"
   puts "sudo rm /etc/init/huginn*\n\n"
@@ -62,7 +62,7 @@ namespace :production do
     while services.length > 0
       services.each do |p|
         supervise = File.join(p, 'supervise')
-        next if !Dir.exists?(supervise)
+        next if !Dir.exist?(supervise)
         run("chown -R huginn:huginn #{p}")
         services.delete(p)
       end