Merge pull request #842 from nasa/iss-840

closes #840
This commit is contained in:
Scott Fennell 2019-07-10 16:06:56 -05:00 committed by GitHub
commit adc3a3e425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -172,6 +172,15 @@ int Trick::CommandLineArguments::process_sim_args(int nargs , char **args) {
} }
} }
if (access(input_file.c_str(), F_OK) != 0) {
input_file = "";
if(strcmp(argv[1], "trick_version") && strcmp(argv[1], "sie") && strcmp(argv[1], "-help") && strcmp(argv[1], "--help") &&
strcmp(argv[1], "-h") && strcmp(argv[1], "help")) {
std::cerr << "\nERROR: Invalid input file or command line argument." << std::endl;
exit(1);
}
}
found = run_dir.find_last_of("/") ; found = run_dir.find_last_of("/") ;
if ( found != std::string::npos ) { if ( found != std::string::npos ) {
run_dir.erase(found) ; run_dir.erase(found) ;

View File

@ -64,6 +64,7 @@ int Trick::Executive::process_sim_args() {
} else if (!strcmp(argv[1], "-help") || !strcmp(argv[1], "--help") || } else if (!strcmp(argv[1], "-help") || !strcmp(argv[1], "--help") ||
!strcmp(argv[1], "-h") || !strcmp(argv[1], "help") ) { !strcmp(argv[1], "-h") || !strcmp(argv[1], "help") ) {
/* Try and help the user */ /* Try and help the user */
printf("%s", buf);
exit(0); exit(0);
} else if (!strcmp(argv[1], "sie")) { } else if (!strcmp(argv[1], "sie")) {
/* do not create init_log.csv if we are generating sie */ /* do not create init_log.csv if we are generating sie */