2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-08 00:04:38 +00:00

Merge pull request #1064 from gavindsouza/cli-fixes

fix: Allow bench src as root
This commit is contained in:
gavin 2020-09-04 16:46:26 +05:30 committed by GitHub
commit afa9362b27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,9 +29,12 @@ def cli():
change_working_directory()
logger = setup_logging() or logging.getLogger(bench.PROJECT_NAME)
logger.info(command)
check_uid()
if sys.argv[1] not in ("src", ):
check_uid()
change_uid()
change_dir()
change_uid()
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)