Rakefile: minor, show error on empty BOM
This commit is contained in:
parent
b38e271a1e
commit
e62773bfa1
4
Rakefile
4
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|
|
||||
|
|
Loading…
Reference in New Issue