Skip to content

Commit

Permalink
Clean-up interaction: adapt to line buffering (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
yecril71pl committed Apr 25, 2023
1 parent e878dec commit f2def70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion init_buildsystem
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,12 @@ if test -e "$BUILD_IS_RUNNING" ; then
echo "y - yes, cleanup the build root"
echo "N - No, abort build (default on enter)"
echo "c - Continue anyway with this build root"
echo -n "[y/N/c] "
# The output is line-buffered, so echo -n will not work
prompt="Your choice: [y/N/c]"
echo "$prompt?"
read ANSWER
# log the choice
echo "$prompt = $ANSWER"
case "$ANSWER" in
c|C)
rm -f $BUILD_IS_RUNNING $BUILD_ROOT/exit ;;
Expand Down

0 comments on commit f2def70

Please sign in to comment.