Basename $(git symbolic-ref -q HEAD)' returned non-zero exit status 1

Hi all,
I have these problem when i type bench update, how can i solve it?

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/mayssaa/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/mayssaa/.bench/bench/commands/update.py”, line 62, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force, reset=reset)
File “/home/mayssaa/.bench/bench/commands/update.py”, line 78, in _update
pull_all_apps(bench_path=bench_path, reset=reset)
File “/home/mayssaa/.bench/bench/app.py”, line 146, in pull_all_apps
remote=remote, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
File “/home/mayssaa/.bench/bench/app.py”, line 177, in get_current_branch
return get_cmd_output(“basename $(git symbolic-ref -q HEAD)”, cwd=repo_dir)
File “/home/mayssaa/.bench/bench/utils.py”, line 326, in get_cmd_output
return subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=open(os.devnull, ‘wb’)).strip()
File “/usr/lib/python2.7/subprocess.py”, line 574, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ‘basename $(git symbolic-ref -q HEAD)’ returned non-zero exit status 1

Try this solution:

1 Like