diff --git a/container/mail-robot/lib/apply-account.rb b/container/mail-robot/lib/apply-account.rb index 798546a..6b9bdfe 100755 --- a/container/mail-robot/lib/apply-account.rb +++ b/container/mail-robot/lib/apply-account.rb @@ -56,7 +56,11 @@ class ApplyAccount @es_port = ES_PORT
# email info file for account issuers.
- @account_issuer = YAML.load_file ENV['ACCOUNT_ISSUER']
- @account_issuer = if File.exists? ENV['ACCOUNT_ISSUER']
YAML.load_file ENV['ACCOUNT_ISSUER']
else
{}
end
Use ?: operation?
I didn't catch what do you mean. the ENV['ACCOUNT_ISSUER'] is an environment variable for account issuer file. to avoid unexpected no file errors, do some check.
Thanks, Luan Shengde
Thanks, Xueliang
@my_info = {}
end
2.23.0