I am using ERPNext: v13.36.3 and Frappe Framework: v13.37.0 in AWS EC2.
I want to update ERPNext to the latest version 13.
when i run “bench update --patch” in frappe-bench, i get the following error:
ERROR: Command 'basename $(git symbolic-ref -q HEAD)' returned non-zero exit status 1.
Traceback (most recent call last):
File "/opt/bitnami/erpnext/bin/bench", line 8, in <module>
sys.exit(cli())
File "/opt/bitnami/erpnext/bench/bench/cli.py", line 127, in cli
bench_command()
File "/opt/bitnami/erpnext/venv/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/opt/bitnami/erpnext/venv/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/bitnami/erpnext/venv/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/bitnami/erpnext/venv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/bitnami/erpnext/venv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/opt/bitnami/erpnext/bench/bench/commands/update.py", line 59, in update
update(
File "/opt/bitnami/erpnext/bench/bench/utils/bench.py", line 407, in update
validate_branch()
File "/opt/bitnami/erpnext/bench/bench/utils/bench.py", line 601, in validate_branch
branch = get_current_branch(app)
File "/opt/bitnami/erpnext/bench/bench/utils/app.py", line 175, in get_current_branch
return get_cmd_output("basename $(git symbolic-ref -q HEAD)", cwd=repo_dir)
File "/opt/bitnami/erpnext/bench/bench/utils/__init__.py", line 214, in get_cmd_output
output = subprocess.check_output(
File "/opt/bitnami/python/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/opt/bitnami/python/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'basename $(git symbolic-ref -q HEAD)' returned non-zero exit status 1.
How to solve the problem?