e.g. when run with dfhack-run
@ -2832,9 +2832,13 @@ static int internal_runCommand(lua_State *L)
int type_1 = lua_type(L, 1);
bool use_console = lua_toboolean(L, 2);
if (use_console)
{
out = Lua::GetOutput(L);
if (!out)
out = &Core::getInstance().getConsole();
}
else
out_buffer.reset(new buffered_color_ostream());