Fix update template issue in Ranger-Agent

Change-Id: Id6430fc5806f8fee1f2c27bd6677f391a6c72744
This commit is contained in:
st6218 2019-04-11 12:19:35 -07:00
parent 0fc8a7490e
commit af67a6877a
1 changed files with 3 additions and 0 deletions

View File

@ -109,6 +109,9 @@ class TemplateRepoClient(object):
if os.path.isfile(templatepath):
os.remove(templatepath)
cmd = 'git -C {0} fetch origin'.format(workdir)
self.run_git('PullTemplate', cmd, workdir=workdir)
cmd = 'git -C {0} checkout FETCH_HEAD -- {1}'.format(
workdir, pathtotemplate)
self.run_git('PullTemplate', cmd, workdir=workdir, is_timeout=True)