chore: allow config location message to be suppressed

This commit is contained in:
Adam Cooke
2024-03-13 19:06:25 +00:00
parent b55becd2ec
commit f760cdb5a1
+3 -1
View File
@@ -43,7 +43,9 @@ module Postal
# key is a legacy file whereas new-style config files will include # key is a legacy file whereas new-style config files will include
# the 'version: 2' key/value. # the 'version: 2' key/value.
if File.file?(config_file_path) if File.file?(config_file_path)
puts "Loading config from #{config_file_path}" unless ENV.fetch("SILENCE_POSTAL_CONFIG_LOCATION_MESSAGE", "false") == "true"
warn "Loading config from #{config_file_path}"
end
config_file = File.read(config_file_path) config_file = File.read(config_file_path)
yaml = YAML.safe_load(config_file) yaml = YAML.safe_load(config_file)