lordgamez commented on a change in pull request #1237: URL: https://github.com/apache/nifi-minifi-cpp/pull/1237#discussion_r783217800
########## File path: extensions/script/ScriptEngine.h ########## @@ -41,7 +43,14 @@ class ScriptEngine { */ virtual void evalFile(const std::string &file_name) = 0; + void setModuleDirectories(std::vector<std::string>&& module_dirs) { + module_directories_ = std::move(module_dirs); + } + virtual ~ScriptEngine() = default; + + protected: + std::vector<std::string> module_directories_; Review comment: I'm all for strong types, but I'm not sure if it's worth here as all these paths are used only in string concatenation so we would only convert these to paths just to convert them back to strings when used. Do you see any greater benefits for using path types? ########## File path: extensions/script/ExecuteScript.cpp ########## @@ -116,6 +121,9 @@ void ExecuteScript::onTrigger(const std::shared_ptr<core::ProcessContext> &conte throw std::runtime_error("No script engine available"); } + if (module_directory_.size()) { + engine->setModuleDirectories(utils::StringUtils::splitAndTrimRemovingEmpty(module_directory_, ",")); Review comment: I think regarding spaces, it would be a more common mistake to leave a space at the beginning, the end or between comma-separated entries than using a file path with actual space in it. I'm not sure if it's worth the effort supporting commas in file paths here, if it would ever be a use case maybe it can be requested. -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org