Bench restart fails

bench restart and bench update is failing on ubuntu 20.04 although it is working with other arguments like migrate.

Traceback (most recent call last):
  File "/home/mujeerhashmi/.local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/bench/cli.py", line 41, in cli
    bench_command()
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/bench/commands/utils.py", line 26, in restart
    restart_supervisor_processes(bench_path='.', web_workers=web)
  File "/home/mujeerhashmi/.local/lib/python3.8/site-packages/bench/utils.py", line 519, in restart_supervisor_processes
    supervisor_status = subprocess.check_output(['sudo', 'supervisorctl', 'status'], cwd=bench_path)
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['sudo', 'supervisorctl', 'status']' returned non-zero exit status 3.

Executing sudo supervisorctl status is just fine from the commandline.

When bench update is executing this particular command is asking for sudo passwords.
$ /home/mujeerhashmi/erp/dev-bench/env/bin/pip install -q -U -e /home/mujeerhashmi/erp/dev-bench/apps/frappe
which seems to me is the culprit for the above error.

Any help will be appreciated.