fix: Do not throw when no instances are defined in YAML files

Reason: Users may use a combination of YAML files, some may not have
both radarr and sonarr config sections in them. We should gracefully
pass over these to allow other configs to be processed.

Should the final list still be empty, the program can gracefully exit
having done no work.
pull/92/head
Robert Dailey 2 years ago
parent 20b6921b0f
commit 5ad8db1294

@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- Do not exit when a YAML config has no sonarr or radarr section.
## [2.2.0] - 2022-06-03
### Added

@ -61,11 +61,6 @@ public class ConfigurationLoader<T> : IConfigurationLoader<T>
parser.SkipThisAndNestedEvents();
}
if (validConfigs.Count == 0)
{
throw new ConfigurationException(configSection, typeof(T), "There are no configured instances defined");
}
return validConfigs;
}

Loading…
Cancel
Save