2.0.0rc1: Script output in app is not realtime, out of order
homebysix opened this issue · 3 comments
Describe the bug
When script output is displayed in the 2.0.0rc1 app, there are two problems:
- output is not displayed in realtime
- info, warnings, reminders, and errors are displayed out of order
To Reproduce
Steps to reproduce the behavior:
- Open Recipe Robot.app version 2.0.0rc1
- Provide input in the form of an app, URL, or path
- Observe that "Making $appname recipes..." appears but no script output is visible until the script is completely finished.
- Observe that warnings and errors appear at the beginning or end of the output, rather than inline with other script output.
Expected behavior
Output should be realtime, and should match the behavior of running the recipe-robot
command line tool in Terminal.
Screenshots
Desktop (please complete the following information):
- macOS: 10.15.7
- Recipe Robot Version: 2.0.0rc1
The plot thickens. During my testing using curl's --progress-bar
output to show file download progress, I discovered that that specific type of output is still shown in real-time in the app:
I tried replicating real-time output using sys.stdout.write()
and sys.stderr.write()
with no luck, but clearly curl is doing something that avoids this issue.
I found that shelling out to echo
seems to work around the issue. I'd like to find a more permanent fix, but that's good enough for now. (eeaa2f9)
echo
workaround included in 2.0.0 release.