Skip to content

Commit

Permalink
Remove unnecessary method
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Jul 26, 2022
1 parent 491bfef commit 029df7a
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions lib/dotenv/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,15 @@ def initialize(argv = [])
end

def run
load_dotenv(@overload, @filenames)
if @overload
Dotenv.overload!(*@filenames)
else
Dotenv.load!(*@filenames)
end
rescue Errno::ENOENT => e
abort e.message
else
exec(*@argv) unless @argv.empty?
end

private

def load_dotenv(overload, filenames)
if overload
Dotenv.overload!(*filenames)
else
Dotenv.load!(*filenames)
end
end
end
end

0 comments on commit 029df7a

Please sign in to comment.