Skip to content
Merged
Changes from all commits
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
8 changes: 8 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ int main(int argc, char **argv)
bool error = false;
const char *filename = nullptr;
bool use_istream = false;
bool fail_on_error = false;

// Settings..
simplecpp::DUI dui;
Expand Down Expand Up @@ -70,6 +71,10 @@ int main(int argc, char **argv)
error_only = true;
found = true;
break;
case 'f':
fail_on_error = true;
found = true;
break;
}
if (!found) {
std::cout << "error: option '" << arg << "' is unknown." << std::endl;
Expand Down Expand Up @@ -172,5 +177,8 @@ int main(int argc, char **argv)
}
}

if (fail_on_error && !outputList.empty())
return 1;

return 0;
}
Loading