mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +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 "../platform/Platform.h"
|
||||||
#include "../scripting/ScriptEngine.h"
|
#include "../scripting/ScriptEngine.h"
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
#include <linenoise.hpp>
|
#include <linenoise.hpp>
|
||||||
|
|
||||||
// Ignore isatty warning on WIN32
|
// Ignore isatty warning on WIN32
|
||||||
@@ -31,6 +32,12 @@ void StdInOutConsole::Start()
|
|||||||
return;
|
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 {
|
std::thread replThread([this]() -> void {
|
||||||
linenoise::SetMultiLine(true);
|
linenoise::SetMultiLine(true);
|
||||||
linenoise::SetHistoryMaxLen(32);
|
linenoise::SetHistoryMaxLen(32);
|
||||||
|
|||||||
Reference in New Issue
Block a user