From a3b629b37a05b97d67620284d1c4536427fc5058 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 8 Apr 2012 21:05:33 -0400 Subject: [PATCH] Be silent if the user does not have a configuration file. --- lib/mailshears.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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| -- 2.43.2