Skip to content

Commit acff5b1

Browse files
Fix lack of entity argument issue in configuration example (#5084)
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
1 parent 0bdc1cc commit acff5b1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

examples/cpp/configuration/CLIParser.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@ class CLIParser
228228
{
229229
configuration_config config;
230230

231+
if (argc < 2)
232+
{
233+
EPROSIMA_LOG_ERROR(CLI_PARSER, "missing entity argument");
234+
print_help(EXIT_FAILURE);
235+
}
236+
231237
std::string first_argument = argv[1];
232238

233239
if (first_argument == "publisher" )

0 commit comments

Comments
 (0)