From 69ce5d9e3faed4b147ae46a3e6910f2d208dff33 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 8 Jan 2021 21:06:42 -0500 Subject: [PATCH] Send runCommand output to correct output stream e.g. when run with dfhack-run --- library/LuaApi.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index ed214397d..d7f3b269f 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -2833,7 +2833,11 @@ static int internal_runCommand(lua_State *L) bool use_console = lua_toboolean(L, 2); if (use_console) { - out = &Core::getInstance().getConsole(); + out = Lua::GetOutput(L); + if (!out) + { + out = &Core::getInstance().getConsole(); + } } else {