diff --git a/Rakefile b/Rakefile index 52f4771..727c781 100644 --- a/Rakefile +++ b/Rakefile @@ -165,6 +165,10 @@ def bom2(schematic, attributes) list.gsub!(/(?!http):(?!\/\/)/, '\1":"\2') # protect the values between ':' (such as URLs) # parse bom2 csv = CSV.parse(list, col_sep: ":", quote_char: '"') + if csv.empty? then + $stderr.puts "no parts found for BOM" + return [] + end csv[1..-1].each do |row| line = {} row.each_index do |col|