Skip to content

Commit

Permalink
Update main.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
xtreme-shane-lattanzio authored Oct 24, 2019
1 parent 97ab9a0 commit d45be01
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/license_finder/cli/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,8 @@ def aggregate_paths
end

def save_report(content, file_name)
require 'fileutils'
dir = File.dirname(file_name)
unless Dir.exist?(dir)
FileUtils.mkdir_p(dir)
end
FileUtils.mkdir_p(dir) unless Dir.exist?(dir)

File.open(file_name, 'w') do |f|
f.write(content)
Expand Down

0 comments on commit d45be01

Please sign in to comment.