I am basically trying to execute heredoc using the Flask-migrate shell with the Flask application context
Below is the command I'm trying to run inside my bash script
$ docker exec -it mycontainer ./manage shell <<-EOF
When I try to execute the above command, I get:
cannot enable tty mode on non tty input
This file is managed :
#!/usr/bin/env python from middleware import create_app, config from middleware.models import db from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand app = create_app(config) migrate = Migrate(app, db) manager = Manager(app) manager.add_command('db', MigrateCommand) if __name__ == '__main__': manager.run()
My question is: is there a way to pass many commands, for example, to heredoc, to the shell?
source share