Fix incomming email check task to use same patch we did in mail_room

This commit is contained in:
Gabriel Mazetto 2017-02-21 18:50:28 +01:00
parent 9d7615d04e
commit 649a1fcf15

View file

@ -724,8 +724,11 @@ namespace :gitlab do
def check_imap_authentication
print "IMAP server credentials are correct? ... "
config_path = Rails.root.join('config', 'mail_room.yml')
config_file = YAML.load(ERB.new(File.read(config_path)).result)
config_path = Rails.root.join('config', 'mail_room.yml').to_s
erb = ERB.new(File.read(config_path))
erb.filename = config_path
config_file = YAML.load(erb.result)
config = config_file[:mailboxes].first
if config