mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 23:33:04 +01:00
Allow disabling of REPL (#25071)
This commit is contained in:
committed by
GitHub
parent
292824ca25
commit
1787b1de69
@@ -16,6 +16,7 @@
|
||||
#include "../platform/Platform.h"
|
||||
#include "../scripting/ScriptEngine.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <linenoise.hpp>
|
||||
|
||||
// Ignore isatty warning on WIN32
|
||||
@@ -31,6 +32,12 @@ void StdInOutConsole::Start()
|
||||
return;
|
||||
}
|
||||
|
||||
// Allow user to disable the console REPL. Setting this environment variable to any value will prevent REPL from starting.
|
||||
if (getenv("OPENRCT2_NO_REPL"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::thread replThread([this]() -> void {
|
||||
linenoise::SetMultiLine(true);
|
||||
linenoise::SetHistoryMaxLen(32);
|
||||
|
||||
Reference in New Issue
Block a user