How to pass 'yes' to python manage.py flush?

Bentley4 picture Bentley4 · May 2, 2013 · Viewed 8.6k times · Source

According to this StackOverflow thread about piping input, running echo "yes" | command should pass yes to the first prompt of a command. However, echo "yes" | python manage.py flush produces the error

EOFError: EOF when reading a line.

Answer

msw picture msw · May 2, 2013

I suspect that manage.py is requesting more than one line of input. Is there a reason you can't use

 python manage.py flush --no-input

as documented?