Commit 4c8ac320dd72f6094bc05128a8c8878e5836f8c4

Authored by Riyad Preukschas
1 parent 757c7a52

Updated gitlab:check task

Showing 1 changed file with 5 additions and 4 deletions   Show diff stats
lib/tasks/gitlab/check.rake
@@ -90,7 +90,7 @@ namespace :gitlab do @@ -90,7 +90,7 @@ namespace :gitlab do
90 end 90 end
91 91
92 def check_gitlab_config_not_outdated 92 def check_gitlab_config_not_outdated
93 - print "GitLab config not outdated? ... " 93 + print "GitLab config outdated? ... "
94 94
95 gitlab_config_file = Rails.root.join("config", "gitlab.yml") 95 gitlab_config_file = Rails.root.join("config", "gitlab.yml")
96 unless File.exists?(gitlab_config_file) 96 unless File.exists?(gitlab_config_file)
@@ -98,11 +98,12 @@ namespace :gitlab do @@ -98,11 +98,12 @@ namespace :gitlab do
98 end 98 end
99 99
100 # omniauth or ldap could have been deleted from the file 100 # omniauth or ldap could have been deleted from the file
101 - if File.read(gitlab_config_file) =~ /^web:/  
102 - puts "yes".green 101 + unless Gitlab.config.pre_40_config
  102 + puts "no".green
103 else 103 else
104 - puts "no".red 104 + puts "yes".red
105 try_fixing_it( 105 try_fixing_it(
  106 + "Backup your config/gitlab.yml",
106 "Copy config/gitlab.yml.example to config/gitlab.yml", 107 "Copy config/gitlab.yml.example to config/gitlab.yml",
107 "Update config/gitlab.yml to match your setup" 108 "Update config/gitlab.yml to match your setup"
108 ) 109 )