Skip to content

Commit 0622e53

Browse files
committed
Fixed help information
1 parent b811507 commit 0622e53

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,17 @@ int main(int argc, char** argv)
2828
branch_subcommand(lg2_obj, app);
2929
checkout_subcommand(lg2_obj, app);
3030

31-
app.parse(argc, argv);
31+
CLI11_PARSE(app, argc, argv);
3232

3333
if (version->count())
3434
{
3535
std::cout << "git2cpp version " << GIT2CPP_VERSION_STRING << " (libgit2 " << LIBGIT2_VERSION << ")" << std::endl;
3636
}
37+
38+
if (app.get_subcommands().size() == 0)
39+
{
40+
std::cout << app.help() << std::endl;
41+
}
3742
}
3843
catch (const CLI::Error& e)
3944
{

0 commit comments

Comments
 (0)