filter out '\r' and '\n' from command string (macOS issue).
This commit is contained in:
@@ -935,9 +935,12 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
std::ostringstream oss;
|
||||
oss << path << "musrfit" << " " << strInfile.str() << " " << musrfitOptions;
|
||||
std::cout << std::endl << ">> msr2data: **INFO** Calling " << oss.str() << std::endl;
|
||||
if (system(oss.str().c_str()) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << oss.str().c_str() << " failed." << std::endl;
|
||||
std::string cmdStr = oss.str();
|
||||
cmdStr.erase(std::remove(cmdStr.begin(), cmdStr.end(), '\r'), cmdStr.end());
|
||||
cmdStr.erase(std::remove(cmdStr.begin(), cmdStr.end(), '\n'), cmdStr.end());
|
||||
std::cout << std::endl << ">> msr2data: **INFO** Calling " << cmdStr << std::endl;
|
||||
if (system(cmdStr.c_str()) == -1) {
|
||||
std::cerr << "**ERROR** cmd: " << cmdStr << " failed." << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user