Skip to content

Commit 8e073be

Browse files
committed
Testing printing version
1 parent e340f29 commit 8e073be

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

standalone/source/main.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ int main(int argc, char** argv) {
2222

2323
auto result = options.parse(argc, argv);
2424

25-
if (result["help"].as<bool>() || patterns.empty()) {
25+
if (result["help"].as<bool>()) {
2626
std::cout << options.help() << std::endl;
2727
return 0;
2828
} else if (result["version"].as<bool>()) {
29-
std::cout << "Glob, version " << GLOB_VERSION << std::endl;
29+
std::cout << "glob, version " << GLOB_VERSION << std::endl;
30+
return 0;
31+
}
32+
33+
if (patterns.empty()) {
34+
std::cout << options.help() << std::endl;
3035
return 0;
3136
}
3237

0 commit comments

Comments
 (0)