From: Michael Orlitzky Date: Mon, 9 Apr 2012 01:05:33 +0000 (-0400) Subject: Be silent if the user does not have a configuration file. X-Git-Tag: 0.0.1~116 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=a3b629b37a05b97d67620284d1c4536427fc5058;p=mailshears.git Be silent if the user does not have a configuration file. --- diff --git a/lib/mailshears.rb b/lib/mailshears.rb index 30dd71e..0402d60 100644 --- a/lib/mailshears.rb +++ b/lib/mailshears.rb @@ -8,13 +8,11 @@ require 'mailshears/postfixadmin_db' # Load the default config file first, and let the user override it. require 'default_configuration' +userconf_path = ENV['HOME'] + '/.mailshears.conf' begin - # Try to load the user's configuration file. - userconf_path = ENV['HOME'] + '/.mailshears.conf' + # Don't crash if it doesn't exist. Maybe he likes the defaults? require userconf_path -rescue - puts 'No user configuration file (~/.mailshears.conf) found.' - puts 'Continuing...' +rescue LoadError end Configuration::PLUGINS.each do |plugin_file|