frappe / bench

CLI to manage Multi-tenant deployments for Frappe apps
https://frappeframework.com/docs/user/en/bench
GNU General Public License v3.0
1.37k stars 1.2k forks source link

`bench --help` should not give a warning when running in a non-bench directory #1550

Closed Delta456 closed 5 months ago

Delta456 commented 5 months ago

Description of the issue

bench --h gives a warning when running in a non-bench directory when it shouldn't because --help is a generic flag and isn't related to the current directory just like --version

Context information (for bug reports)

Output of bench version

5.22.3

Steps to reproduce the issue

  1. Type bench --help
  2. Look at the warning

Observed result

image

Expected result

No warning for --help just like there isn't for --version

image

Additional information

Pop OS, Installed from pip3

ankush commented 5 months ago

Best to leave this in. Not executing command in bench dir is frequent confusion.

Also help inside bench dir and outside bench dir is different.

Outside of bench, only "init" is the command that's actually used like 99% of the time.

Ref https://github.com/frappe/bench/blob/develop/bench/cli.py#L117