From 869a67a926b1e38b9aab553c24cb7c1fa04ae20b Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 20 Dec 2024 12:19:03 +0100 Subject: [PATCH] handle invalid directory for the study --- src/solver/modeler/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/solver/modeler/main.cpp b/src/solver/modeler/main.cpp index cc1a782cad..fc5f8d6ff6 100644 --- a/src/solver/modeler/main.cpp +++ b/src/solver/modeler/main.cpp @@ -35,6 +35,13 @@ int main(int argc, const char** argv) } std::filesystem::path studyPath(argv[1]); + logs.info() << "Study path: " << studyPath; + + if (!std::filesystem::is_directory(studyPath)) + { + logs.error() << "The path provided isn't a valid directory, exiting"; + return EXIT_FAILURE; + } const auto parameters = parseModelerParameters(studyPath); const auto libraries = LoadFiles::loadLibraries(studyPath);