2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-22 20:19:01 +00:00

fix get current frappe version

This commit is contained in:
Pratik Vyas 2015-03-03 16:39:07 +05:30
parent 84aeb0fceb
commit feceb591d4

View File

@ -113,7 +113,10 @@ def get_current_frappe_version(bench='.'):
apps_dir = os.path.join(bench, 'apps')
frappe_dir = os.path.join(apps_dir, 'frappe')
return get_major_version(get_current_version(frappe_dir))
try:
return get_major_version(get_current_version(frappe_dir))
except IOError:
return ''
def get_current_branch(repo_dir):
return get_cmd_output("basename $(git symbolic-ref -q HEAD)", cwd=repo_dir)