Skip to content

Commit 3792c83

Browse files
committed
throw error when yaml files can't be loaded
1 parent 956a455 commit 3792c83

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/arduino_ci/ci_config.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ def validate_data(rootname, source, schema)
106106
# @return [ArduinoCI::CIConfig] a reference to self
107107
def load_yaml(path)
108108
yml = YAML.load_file(path)
109+
raise "The YAML file at #{path} failed to load" unless yml
110+
109111
if yml.include?("packages")
110112
yml["packages"].each do |k, v|
111113
valid_data = validate_data("packages", v, PACKAGE_SCHEMA)

0 commit comments

Comments
 (0)