
My plan is to automate the updating process of Factorio from within my mod manager using --apply-update.
To know in what stage the update process currently is in I am trying to read the console output of Factorio (so I can know when it's done and close Factorio). However, I have now noticed that it appears to be impossible to redirect Factorios standard output.
When redirecting stdout I just did not get any feedback inside my mod manager which made me do some testing.
First I tried redirecting the output of other command line applications and my code worked fine.
Then I tried to redirect Factorios output directly to a file using the standard redirect feature of the consele ('factorio.exe -h > file.txt') and that did not work either.
At this point I am pretty much out of ideas. It appears that Factorio somehow writes to the console without using stdout, if that is even possible. Also I have noticed that the console does not properly display the working directory again after Factorio has terminated like it should do (you have to press enter once to get it to show).
Maybe one of the devs can enlighten me about what is going on with Factorio and the console.