Skip to content

Commit

Permalink
Fix segfault when no CLI argument is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Jan 7, 2025
1 parent c6a693e commit d80210d
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 @@ -26,11 +26,18 @@
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)
{
if (argc < 1)
if (argc <= 1)
{
logs.error() << "No study path provided, exiting.";
usage();
return EXIT_FAILURE;
}

Expand Down

0 comments on commit d80210d

Please sign in to comment.