openSUSE / osc

The Command Line Interface to work with an Open Build Service
http://openbuildservice.org/
GNU General Public License v2.0
170 stars 185 forks source link

osc does not flush stdout before asking questions #126

Closed olafhering closed 8 years ago

olafhering commented 10 years ago

osc build $REPO $ARCH &> log.$REPO.$ARCH.txt

This hangs and nothing in log.$REPO.$ARCH.txt indicates why. I guess its sitting there and asking if its ok to use packages from some other repo referenced by $REPO.

It would be nice of whatever is asking for user input does flush stdout before reading from stdin.

kiwidude commented 9 years ago

Totally agree! There are more manifestations of the same problem, see http://lists.opensuse.org/opensuse-buildservice/2015-05/msg00026.html

Also: http://bugzilla.novell.com/show_bug.cgi?id=930137

A workaround seems to be to run osc through stdbuf, like: stdbuf -o0 -e0 osc ...

marcus-h commented 8 years ago

This was fixed in the meantime (see commits 22b272f3afc1a3f3b83b764b7745a662bc0aa234 and 56a9ab60dc77f5dcbf1b29b7846c09f8d80c138c).