Skip to content

Commit

Permalink
[antares-modeler] Fix segfault when no CLI argument is provided (#2557)
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes authored Jan 13, 2025
1 parent bd4968d commit fe48071
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/solver/modeler/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,20 @@
using namespace Antares;
using namespace Antares::Solver;

static void usage()
{
std::cout << "Usage:\n"
<< "antares-modeler <path/to/study>\n";
}

int main(int argc, const char** argv)
{
logs.applicationName("modeler");
if (argc <= 1)

if (argc < 1)
{
logs.error() << "No study path provided, exiting.";
usage();
return EXIT_FAILURE;
}

Expand Down

0 comments on commit fe48071

Please sign in to comment.