Ask.run() does not flush stdout before waiting for input #156

Closed
opened 2021-11-15 16:39:12 +02:00 by geoffbeier · 2 comments

When meli is executed without a configuration or with an incomplete configuration, it uses Ask.run() to ask the user about setting some defaults.

It prints the question to stdout without a newline, and stdout is buffered on many systems. So meli appears to hang when it's waiting for an answer to the question that the user has not seen yet.

explicitly flushing stdout after using the print macro fixes this.

When meli is executed without a configuration or with an incomplete configuration, it uses Ask.run() to ask the user about setting some defaults. It prints the question to stdout without a newline, and stdout is buffered on many systems. So meli appears to hang when it's waiting for an answer to the question that the user has not seen yet. explicitly flushing stdout after using the print macro fixes this.

This tracker would not let me attach a patch, so it's here:

https://paste.sr.ht/~tuxpup/cf4617c9227c67c55488917e0232094875316a28

This tracker would not let me attach a patch, so it's here: https://paste.sr.ht/~tuxpup/cf4617c9227c67c55488917e0232094875316a28

Closed by 330a2b20ed

Closed by 330a2b20ed
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: meli/meli#156
There is no content yet.