From abd17c8a9d61a86714cfdd58555c9b3607c9d1b0 Mon Sep 17 00:00:00 2001 From: eric bryant Date: Thu, 26 Mar 2020 17:17:59 -0400 Subject: [PATCH] return 1 with fatal errors --- siteupdate/cplusplus/siteupdate.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/siteupdate/cplusplus/siteupdate.cpp b/siteupdate/cplusplus/siteupdate.cpp index 29e022c0..941f7ca8 100644 --- a/siteupdate/cplusplus/siteupdate.cpp +++ b/siteupdate/cplusplus/siteupdate.cpp @@ -121,9 +121,7 @@ int main(int argc, char *argv[]) } closedir(dir); } - else { cout << "Error opening directory " << args.userlistfilepath << ". (Not found?)" << endl; - return 0; - } + else el.add_error("Error opening user list file path \""+args.userlistfilepath+"\". (Not found?)"); } else for (string &id : traveler_ids) id += ".list"; @@ -952,7 +950,7 @@ int main(int argc, char *argv[]) { cout << "ABORTING due to " << el.error_list.size() << " errors:" << endl; for (unsigned int i = 0; i < el.error_list.size(); i++) cout << i+1 << ": " << el.error_list[i] << endl; - return 0; + return 1; } #ifdef threading_enabled