Skip to content

Commit

Permalink
Only make dir if non-empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jez-stripe committed May 22, 2019
1 parent 7e12584 commit caa51cf
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ def initialize(files:, delegate_classes:)
def serialize(output_dir)
gem_class_defs = preprocess(@files)

if !gem_class_defs.empty?
FileUtils.mkdir_p(output_dir)
end
FileUtils.mkdir_p(output_dir) unless gem_class_defs.empty?

gem_class_defs.each do |gem, klass_ids|
File.open("#{File.join(output_dir, gem[:gem])}.rbi", 'w') do |f|
Expand Down

0 comments on commit caa51cf

Please sign in to comment.