File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
15
15
### Removed
16
16
17
17
### Fixed
18
+ - A missing ` examples ` directory no longer causes a crash in ` cpp_library.rb `
18
19
19
20
### Security
20
21
Original file line number Diff line number Diff line change @@ -132,7 +132,10 @@ def info
132
132
# @param installed_library_path [String] The library to query
133
133
# @return [Array<String>] Example sketch files
134
134
def example_sketches
135
- reported_dirs = info [ "library" ] [ "examples" ] . map ( &Pathname ::method ( :new ) )
135
+ examples = info [ "library" ] [ "examples" ]
136
+ return [ ] if examples . nil?
137
+
138
+ reported_dirs = examples . map ( &Pathname ::method ( :new ) )
136
139
reported_dirs . map { |e | e + e . basename . sub_ext ( ".ino" ) } . select ( &:exist? ) . sort_by ( &:to_s )
137
140
end
138
141
You can’t perform that action at this time.
0 commit comments