Bench update failure v14

hi try to run bench update on erpnext v14
i get error

ERROR: Command ‘basename $(git symbolic-ref -q HEAD)’ returned non-zero exit status 1.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.8/dist-packages/bench/cli.py”, line 121, in cli
raise e
File “/usr/local/lib/python3.8/dist-packages/bench/cli.py”, line 111, in cli
bench_command()
File “/usr/lib/python3/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/lib/python3/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/lib/python3/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib/python3/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python3/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/bench/commands/update.py”, line 23, in update
update(pull=pull, apps=apps, patch=patch, build=build, requirements=requirements, restart_supervisor=restart_supervisor, restart_systemd=restart_systemd, backup=not no_backup, compile=not no_compile, force=force, reset=reset)
File “/usr/local/lib/python3.8/dist-packages/bench/utils/bench.py”, line 389, in update
validate_branch()
File “/usr/local/lib/python3.8/dist-packages/bench/utils/bench.py”, line 583, in validate_branch
branch = get_current_branch(app)
File “/usr/local/lib/python3.8/dist-packages/bench/utils/app.py”, line 165, in get_current_branch
return get_cmd_output(“basename $(git symbolic-ref -q HEAD)”, cwd=repo_dir)
File “/usr/local/lib/python3.8/dist-packages/bench/utils/init.py”, line 185, in get_cmd_output
output = subprocess.check_output(
File “/usr/lib/python3.8/subprocess.py”, line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/usr/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

any help

Hi,

It may help to say the operating environment , how version 14 was installed, and whether this was the first attempt to update or if update had been successful in the past.

hello smino thanks for you replay
bench --version 5.8.1
bench version
erpnext 14.x.x-develop
frappe 14.0.0-dev
in the past update successful for one time
how can i know wat erpnext i have!!
in github the latest v14 release is 14.0.0-beta.4 Release
in my erpnext dashboard in hep i get

Installed Apps

ERPNext: v14.x.x-develop () (develop)
Frappe Framework: v14.0.0-dev (HEAD)

My version 14 test vm has

erpnext 14.0.0-beta.4
frappe 14.x.x-develop

after: bench switch-to-branch version-14-beta erpnext

git status in the apps folder may have some more info.