From 07f7b46a8a4cb172bfed7a4f6f4d00fb5803fa4b Mon Sep 17 00:00:00 2001 From: Ben Charlton Date: Fri, 28 Aug 2020 20:38:16 +0100 Subject: [PATCH] Fix invoke pty error when running 'invoke superuser' --- tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks.py b/tasks.py index 3d92cec5c4..b7bda95033 100644 --- a/tasks.py +++ b/tasks.py @@ -47,7 +47,7 @@ def managePyPath(): return os.path.join(managePyDir(), 'manage.py') -def manage(c, cmd): +def manage(c, cmd, pty=False): """ Runs a given command against django's "manage.py" script. @@ -59,7 +59,7 @@ def manage(c, cmd): c.run('cd {path} && python3 manage.py {cmd}'.format( path=managePyDir(), cmd=cmd - )) + ), pty=pty) @task(help={'length': 'Length of secret key (default=50)'}) def key(c, length=50, force=False): @@ -106,7 +106,7 @@ def superuser(c): Create a superuser (admin) account for the database. """ - manage(c, 'createsuperuser') + manage(c, 'createsuperuser', pty=True) @task def migrate(c):