From 31e4aeeab8bca4a8d58ad72db735128670a7480b Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Thu, 24 Sep 2020 12:56:11 +0530 Subject: [PATCH] fix: Handle no args passed in CLI --- bench/cli.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bench/cli.py b/bench/cli.py index 95ca545d..e0d94f1a 100755 --- a/bench/cli.py +++ b/bench/cli.py @@ -30,11 +30,10 @@ def cli(): logger = setup_logging() or logging.getLogger(bench.PROJECT_NAME) logger.info(command) - if sys.argv[1] not in ("src", ): + if len(sys.argv) > 1 and sys.argv[1] not in ("src", ): check_uid() change_uid() - - change_dir() + 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"): 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)