2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 09:02:10 +00:00

[command] bench src

This commit is contained in:
Anand Doshi 2016-07-04 15:18:52 +05:30
parent 82accf7f2a
commit d09d448360
2 changed files with 9 additions and 1 deletions

View File

@ -30,7 +30,7 @@ bench_command.add_command(switch_to_v5)
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,
disable_production)
disable_production, bench_src)
bench_command.add_command(start)
bench_command.add_command(restart)
bench_command.add_command(set_nginx_port)
@ -46,6 +46,7 @@ bench_command.add_command(backup_all_sites)
bench_command.add_command(release)
bench_command.add_command(renew_lets_encrypt)
bench_command.add_command(disable_production)
bench_command.add_command(bench_src)
from bench.commands.setup import setup
bench_command.add_command(setup)

View File

@ -135,3 +135,10 @@ def disable_production():
"""Disables production environment for the bench."""
from bench.config.production_setup import disable_production
disable_production(bench_path='.')
@click.command('src')
def bench_src():
"""Prints bench source folder path, which can be used as: cd `bench src` """
import bench
print os.path.dirname(bench.__path__[0])