use app context aware cli, fixes #65

This commit is contained in:
Matthew Scragg 2015-07-22 12:01:49 -05:00
parent 8a7ef6bc90
commit bd41eaac4e
4 changed files with 51 additions and 7 deletions

View file

@ -1,4 +1,4 @@
from realms import config, create_app, db, __version__, cli
from realms import config, create_app, db, __version__, flask_cli as cli
from realms.lib.util import random_string, in_virtualenv, green, yellow, red
from subprocess import call, Popen
from multiprocessing import cpu_count
@ -13,7 +13,6 @@ import subprocess
# called to discover commands in modules
app = create_app()
def get_user():
for name in ('SUDO_USER', 'LOGNAME', 'USER', 'LNAME', 'USERNAME'):
user = os.environ.get(name)