diff --git a/trick_source/sim_services/CommandLineArguments/CommandLineArguments.cpp b/trick_source/sim_services/CommandLineArguments/CommandLineArguments.cpp index bdd9dbb0..8926d030 100644 --- a/trick_source/sim_services/CommandLineArguments/CommandLineArguments.cpp +++ b/trick_source/sim_services/CommandLineArguments/CommandLineArguments.cpp @@ -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("/") ; if ( found != std::string::npos ) { run_dir.erase(found) ; diff --git a/trick_source/sim_services/Executive/Executive_process_sim_args.cpp b/trick_source/sim_services/Executive/Executive_process_sim_args.cpp index 939c0c5f..342a4191 100644 --- a/trick_source/sim_services/Executive/Executive_process_sim_args.cpp +++ b/trick_source/sim_services/Executive/Executive_process_sim_args.cpp @@ -64,6 +64,7 @@ int Trick::Executive::process_sim_args() { } else if (!strcmp(argv[1], "-help") || !strcmp(argv[1], "--help") || !strcmp(argv[1], "-h") || !strcmp(argv[1], "help") ) { /* Try and help the user */ + printf("%s", buf); exit(0); } else if (!strcmp(argv[1], "sie")) { /* do not create init_log.csv if we are generating sie */