2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

chore: drop bench shell command

This commit is contained in:
Gavin D'souza 2020-02-12 14:55:30 +05:30
parent 043f044853
commit 90d2313947
2 changed files with 1 additions and 15 deletions

View File

@ -40,7 +40,7 @@ bench_command.add_command(switch_to_develop)
from bench.commands.utils import (start, restart, set_nginx_port, set_ssl_certificate, set_ssl_certificate_key, set_url_root, from bench.commands.utils import (start, restart, set_nginx_port, set_ssl_certificate, set_ssl_certificate_key, set_url_root,
set_mariadb_host, set_default_site, download_translations, shell, backup_site, backup_all_sites, release, renew_lets_encrypt, set_mariadb_host, set_default_site, download_translations, backup_site, backup_all_sites, release, renew_lets_encrypt,
disable_production, bench_src, prepare_beta_release, set_redis_cache_host, set_redis_queue_host, set_redis_socketio_host, find_benches, migrate_env) disable_production, bench_src, prepare_beta_release, set_redis_cache_host, set_redis_queue_host, set_redis_socketio_host, find_benches, migrate_env)
bench_command.add_command(start) bench_command.add_command(start)
bench_command.add_command(restart) bench_command.add_command(restart)
@ -54,7 +54,6 @@ bench_command.add_command(set_redis_queue_host)
bench_command.add_command(set_redis_socketio_host) bench_command.add_command(set_redis_socketio_host)
bench_command.add_command(set_default_site) bench_command.add_command(set_default_site)
bench_command.add_command(download_translations) bench_command.add_command(download_translations)
bench_command.add_command(shell)
bench_command.add_command(backup_site) bench_command.add_command(backup_site)
bench_command.add_command(backup_all_sites) bench_command.add_command(backup_all_sites)
bench_command.add_command(release) bench_command.add_command(release)

View File

@ -116,19 +116,6 @@ def renew_lets_encrypt():
from bench.config.lets_encrypt import renew_certs from bench.config.lets_encrypt import renew_certs
renew_certs() renew_certs()
@click.command()
def shell(bench_path='.'):
if not os.environ.get('SHELL'):
print("Cannot get shell")
sys.exit(1)
if not os.path.exists('sites'):
print("sites dir doesn't exist")
sys.exit(1)
env = copy.copy(os.environ)
env['PS1'] = '(' + os.path.basename(os.path.dirname(os.path.abspath(__file__))) + ')' + env.get('PS1', '')
env['PATH'] = os.path.dirname(os.path.abspath(os.path.join('env','bin')) + ':' + env['PATH'])
os.chdir('sites')
os.execve(env['SHELL'], [env['SHELL']], env)
@click.command('backup', help="Backup single site") @click.command('backup', help="Backup single site")
@click.argument('site') @click.argument('site')