Rakefile: minor, show error on empty BOM
This commit is contained in:
parent
d21265f083
commit
6c51f29372
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
Block a user