adamdebreceni commented on a change in pull request #1193:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1193#discussion_r723310251
##########
File path: libminifi/src/core/extension/ExtensionManager.cpp
##########
@@ -86,14 +86,21 @@ ExtensionManager& ExtensionManager::get() {
return instance;
}
+constexpr const char* DEFAULT_EXTENSION_PATH = "../extensions/*";
+
bool ExtensionManager::initialize(const std::shared_ptr<Configure>& config) {
static bool initialized = ([&] {
logger_->log_trace("Initializing extensions");
// initialize executable
active_module_->initialize(config);
- std::optional<std::string> pattern = config ?
config->get(nifi_extension_path) : std::nullopt;
- if (!pattern) return;
- auto candidates =
utils::file::match(utils::file::FilePattern(pattern.value(), [&]
(std::string_view subpattern, std::string_view error_msg) {
+ std::string pattern = [&] {
+ auto opt_pattern = config->get(nifi_extension_path);
Review comment:
in theory this shouldn't occur, but we better handle it anyway, added an
error log
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]