How could I capture compiler errors go in lua?
I'm trying to get the output of the comp compiler errors in a tmux panel using lua when executing the script the result is only shown in the current panel and not in the second panel and the /tmp/output file is always empty
cmd=io.popen("go build -gcflags=-e scree.go")
f=io.open("/tmp/output")
f:write(cmd:read("*all"))
for line in f:lines() do
os.execute("tmux run-shell -t 2 'echo " .. line .. "' ")
end
f:close()
Is there any way to do this without using a temporary file?