Skip to content

Commit b9e59df

Browse files
committed
return empty arrays instead of nil in ci_config
1 parent 7ab1ae8 commit b9e59df

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1717

1818
### Fixed
1919
- Replaced pipes with `Open3.capture3` to avoid deadlocks when commands have too much output
20+
- `ci_config.rb` now returns empty arrays (instead of nil) for undefined config keys
2021

2122
### Security
2223

lib/arduino_ci/ci_config.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,14 @@ def package_url(package)
200200
# platforms to build [the examples on]
201201
# @return [Array<String>] The platforms to build
202202
def platforms_to_build
203+
return [] if @compile_info[:platforms].nil?
203204
@compile_info[:platforms]
204205
end
205206

206207
# platforms to unit test [the tests on]
207208
# @return [Array<String>] The platforms to unit test on
208209
def platforms_to_unittest
210+
return [] if @unittest_info[:platforms].nil?
209211
@unittest_info[:platforms]
210212
end
211213

0 commit comments

Comments
 (0)