diff --git a/library/Core.cpp b/library/Core.cpp index 380f37965..00a8879fc 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -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()