2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-13 16:56:33 +00:00

feat: Skip warnings if envvar BENCH_DEVELOPER set

This commit is contained in:
Gavin D'souza 2021-09-29 06:12:19 +05:30
parent 616dff8fbb
commit 20560c97c4

View File

@ -47,7 +47,7 @@ def cli():
change_uid()
change_dir()
if (
if not os.environ.get("BENCH_DEVELOPER") and (
is_dist_editable(bench.PROJECT_NAME)
and len(sys.argv) > 1
and sys.argv[1] != "src"
@ -60,18 +60,17 @@ def cli():
level=3,
)
in_bench = is_bench_directory()
if (
not is_bench_directory()
not in_bench
and not cmd_requires_root()
and len(sys.argv) > 1
and sys.argv[1] not in ("init", "find", "src", "drop", "get", "get-app")
):
log("Command not being executed in bench directory", level=3)
if len(sys.argv) > 2 and sys.argv[1] == "frappe":
old_frappe_cli()
elif len(sys.argv) > 1:
if in_bench and len(sys.argv) > 1:
if sys.argv[1] == "--help":
print(click.Context(bench_command).get_help())
print(get_frappe_help())