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

fix: Allow bench src as root

This commit is contained in:
Gavin D'souza 2020-09-03 13:11:31 +05:30
parent a1b4dc4a49
commit 9d1f7a7ed7

View File

@ -29,10 +29,13 @@ def cli():
change_working_directory() change_working_directory()
logger = setup_logging() or logging.getLogger(bench.PROJECT_NAME) logger = setup_logging() or logging.getLogger(bench.PROJECT_NAME)
logger.info(command) logger.info(command)
if sys.argv[1] not in ("src", ):
check_uid() check_uid()
change_dir()
change_uid() change_uid()
change_dir()
if is_dist_editable(bench.PROJECT_NAME) and len(sys.argv) > 1 and sys.argv[1] != "src" and not get_config(".").get("developer_mode"): if is_dist_editable(bench.PROJECT_NAME) and len(sys.argv) > 1 and sys.argv[1] != "src" and not get_config(".").get("developer_mode"):
log("bench is installed in editable mode!\n\nThis is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`\n", level=3) log("bench is installed in editable mode!\n\nThis is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`\n", level=3)