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.36k stars 1.19k forks source link

Bench Error when Using (Bench Update) #1413

Open osama1998H opened 1 year ago

osama1998H commented 1 year ago

Issue: Bug report

Please make sure your issue is reproducible on the latest bench version. The currently supported branches are:

Do the checklist before filing an issue:

Describe the bug :chart_with_downwards_trend: can't find what happened just throw an error when updating using bench update

frappe@localhost:~/aoai-app$ bench update ERROR: Command 'basename $(git symbolic-ref -q HEAD)' returned non-zero exit status 1. Traceback (most recent call last): File "/home/frappe/.local/bin/bench", line 8, in <module> sys.exit(cli()) File "/home/frappe/.local/lib/python3.10/site-packages/bench/cli.py", line 127, in cli bench_command() File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/frappe/.local/lib/python3.10/site-packages/bench/commands/update.py", line 59, in update update( File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/bench.py", line 422, in update validate_branch() File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/bench.py", line 616, in validate_branch branch = get_current_branch(app) File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/app.py", line 175, in get_current_branch return get_cmd_output("basename $(git symbolic-ref -q HEAD)", cwd=repo_dir) File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/__init__.py", line 217, in get_cmd_output output = subprocess.check_output( File "/usr/lib/python3.10/subprocess.py", line 420, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.10/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'basename $(git symbolic-ref -q HEAD)' returned non-zero exit status 1.

To Reproduce :page_with_curl: Steps to reproduce the behavior:

  1. Go to 'project directory
  2. Write the command "bench update"
  3. Scroll down to 'the last line'
  4. See the error

Expected behavior :chart_with_upwards_trend: A clear and concise description of what you expected to happen.

Screenshots :crystal_ball: If applicable, add screenshots to help explain your problem.

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

Version Information

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

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

Possible Solution :bookmark_tabs: Any idea what might be causing the issue. Or if you have a proposed solution to the problem.

littletuna4 commented 11 months ago

Having the same issue, did you work it out @osama1998H ?

PrashantJ2021 commented 1 month ago

Having same issue, any work around? Which bench version introduced this bug? Does downgrade bench version works?