Skip to content

Commit

Permalink
Merge pull request frappe#1064 from gavindsouza/cli-fixes
Browse files Browse the repository at this point in the history
fix: Allow bench src as root
  • Loading branch information
gavindsouza authored Sep 4, 2020
2 parents 0463e61 + 9d1f7a7 commit afa9362
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bench/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit afa9362

Please sign in to comment.