Error on Bench update command

I recieved this error while trying to run update command from bench folder.

ashffaq@vultr:~/bench$ bench update

INFO:bench.utils:updating bench
        INFO:bench.utils:git pull
        Already up to date.
        Traceback (most recent call last):
          File "/usr/local/bin/bench", line 11, in <module>
        load_entry_point('bench', 'console_scripts', 'bench')()
          File "/home/ashffaq/.bench/bench/", line 40, in cli
          File "/usr/lib/python3/dist-packages/click/", line 722, in __call__
        return self.main(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/click/", line 697, in main
        rv = self.invoke(ctx)
          File "/usr/lib/python3/dist-packages/click/", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
          File "/usr/lib/python3/dist-packages/click/", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
          File "/usr/lib/python3/dist-packages/click/", line 535, in invoke
        return callback(*args, **kwargs)
          File "/home/ashffaq/.bench/bench/commands/", line 51, in update
          File "/home/ashffaq/.bench/bench/", line 428, in validate_branch
        branch = get_current_branch(app)
          File "/home/ashffaq/.bench/bench/", line 281, in get_current_branch
        return get_cmd_output("basename $(git symbolic-ref -q HEAD)", cwd=repo_dir)
          File "/home/ashffaq/.bench/bench/", line 370, in get_cmd_output
        output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.PIPE).strip()
          File "/usr/lib/python3.6/", line 356, in check_output
          File "/usr/lib/python3.6/", line 438, in run
        output=stdout, stderr=stderr)
        subprocess.CalledProcessError: Command 'basename $(git symbolic-ref -q HEAD)' returned non-zero exit status 1.