Solution for https://github.com/techniq/flask-script/issues/71