Skip to content

Commit

Permalink
Log a message when profile has not valid sofware section
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Feb 22, 2019
1 parent f8a95af commit a6a0bfa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/modules/AutoinstFunctions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,14 @@ def identify_product_by_selection(profile)
# @return [String] product name
def base_product_name(profile)
software = profile["software"] || {}
products = software["products"] || []

products.first
if software.nil?
log.info("Error: given profile has not a valid `software` section")

return nil
end

software.fetch("products", []).first
end
end

Expand Down

0 comments on commit a6a0bfa

Please sign in to comment.