bench icon indicating copy to clipboard operation
bench copied to clipboard

Function cmd_requires_root return None

Open coela-oss opened this issue 1 year ago • 0 comments

Issue: Bug report

Do the checklist before filing an issue:

  • [x] Can you replicate the issue on the supported bench versions?
  • [x] Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome

Describe the bug :chart_with_downwards_trend:

in develop branch

bench init
WARN: You should not run this command as root

To Reproduce :page_with_curl:

Steps to reproduce the behavior:

  1. Setup bench from clone this repo to local Linux (I use ubuntu 22 with Windows WSL)
  2. bench init as root
  3. See error

Expected behavior :chart_with_upwards_trend:

The cause is that None is returned here.

I think it should be return False without match any conditions.

Screenshots :crystal_ball:

OS (please complete the following information): :cyclone:

  • [ x] Linux: Ubuntu 22
  • [ ] macOS: version
  • [ ] Windows version
  • [ ] Others? haros:distro:version

Version Information

Can be found out by running bench version in your respective bench folder.

  • Bench Branch: develop
  • Frappe Version: 15
  • ERPNext Version:

Additional context :page_facing_up: Add any other context about the problem here.

I am a new of ERP Next and Frappe Bench. So, I don't fully understand how change return to False on this issue will affect other areas.

coela-oss avatar Jan 23 '24 08:01 coela-oss