exit if a fatal startup error is encountered while in headless mode (#1491)

develop
Ben Lubar 2020-02-09 18:05:09 -06:00 committed by GitHub
parent be881936f3
commit 69611ab325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

@ -1579,6 +1579,12 @@ void Core::fatal (std::string output)
#else
cout << "DFHack fatal error: " << out.str() << std::endl;
#endif
bool is_headless = bool(getenv("DFHACK_HEADLESS"));
if (is_headless)
{
exit('f');
}
}
std::string Core::getHackPath()