remove io overrides

they were causing side effects when writing luacov reports
develop
myk002 2021-02-27 22:34:46 -08:00
parent ba6a02eb59
commit 754baa45b3
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 0 additions and 20 deletions

@ -51,26 +51,6 @@ if dfhack.is_core_context then
SC_UNPAUSED = 8 SC_UNPAUSED = 8
end end
-- redirect any output explicitly sent to io.stdout or io.stderr to the standard
-- output sinks. note that although the functions take and pass ...,
-- only the first string argument will be printed by dfhack.printerr().
if not io_write_rerouted then
local io_file_methods = getmetatable(io.stderr).__index
local std_io_file_write = io_file_methods.write
io_file_methods.write = function(f, ...)
if f == io.stdout then
print(...)
return f
end
if f == io.stderr then
dfhack.printerr(...)
return f
end
return std_io_file_write(f, ...)
end
io_write_rerouted = true
end
-- Error handling -- Error handling
safecall = dfhack.safecall safecall = dfhack.safecall