Skip to content

Commit ffc4282

Browse files
committed
Add guard for library properties path nonexistence
1 parent 4114f7e commit ffc4282

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/arduino_ci/library_properties.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class LibraryProperties
1111
# @param path [Pathname] The path to the library.properties file
1212
def initialize(path)
1313
@fields = {}
14+
raise ArgumentError, "Library properties at '#{path}' doesn't exist" unless path.exist?
15+
1416
File.foreach(path) do |line_with_delim|
1517
line = line_with_delim.chomp
1618
parts = line.split("=", 2)

0 commit comments

Comments
 (0)