2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-11 15:51:03 +00:00

fix: git depth, fixed requirements (#845)

This commit is contained in:
gavin 2019-10-21 15:48:38 +05:30 committed by Chinmay Pai
parent 5c5993bf01
commit ce6b4c8a11
3 changed files with 10 additions and 9 deletions

View File

@ -419,9 +419,9 @@ def get_apps_json(path):
if path.startswith('http'):
r = requests.get(path)
return r.json()
else:
with open(path) as f:
return json.load(f)
with open(path) as f:
return json.load(f)
def validate_branch():
for app in ['frappe', 'erpnext']:

View File

@ -354,16 +354,16 @@ def check_git_for_shallow_clone():
from .config.common_site_config import get_config
config = get_config('.')
if config.get('release_bench'):
return False
if config:
if config.get('release_bench'):
return False
if not config.get('shallow_clone'):
return False
if not config.get('shallow_clone'):
return False
git_version = get_git_version()
if git_version > 1.9:
return True
return False
def get_cmd_output(cmd, cwd='.'):
try:
@ -540,7 +540,7 @@ def update_json_file(filename, ddict):
content.update(ddict)
with open(filename, 'w') as f:
content = json.dump(content, f, indent=1, sort_keys=True)
json.dump(content, f, indent=1, sort_keys=True)
def drop_privileges(uid_name='nobody', gid_name='nogroup'):
# from http://stackoverflow.com/a/2699996

View File

@ -1,3 +1,4 @@
six
Click
jinja2
virtualenv