Skip to content

Commit

Permalink
use rescue LoadError
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejbisewski committed Mar 13, 2024
1 parent 9539dfd commit 049bdc6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/eventboss/cli.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require 'rubygems'
require 'dotenv'
begin
require 'dotenv'
Dotenv.load
rescue LoadError
end
require 'optparse'
require 'yaml'
require 'erb'
Expand Down Expand Up @@ -36,8 +40,6 @@ def run
private

def boot_system
Dotenv.load if defined?(Dotenv)

require 'rails'
if ::Rails::VERSION::MAJOR < 4
require File.expand_path('config/environment.rb')
Expand Down

0 comments on commit 049bdc6

Please sign in to comment.