Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[antares-modeler] Fix segfault when no CLI argument is provided #2557

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading