mirror of https://github.com/Jittor/Jittor
fix git error msg
This commit is contained in:
parent
ba8b1e6949
commit
d148f4539b
|
@ -172,11 +172,9 @@ def install_cutt(root_folder):
|
|||
|
||||
if os.path.exists(fullname):
|
||||
md5 = os.popen('md5sum ' + fullname).read().split()[0]
|
||||
else:
|
||||
md5 = '233'
|
||||
if md5 != true_md5:
|
||||
os.system('rm ' + fullname)
|
||||
os.system('rm -rf ' + dirname)
|
||||
if md5 != true_md5:
|
||||
os.system('rm ' + fullname)
|
||||
os.system('rm -rf ' + dirname)
|
||||
if not os.path.isfile(os.path.join(dirname, "bin", "cutt_test")):
|
||||
LOG.i("Downloading cutt...")
|
||||
download_url_to_local(url, filename, root_folder, true_md5)
|
||||
|
|
|
@ -150,7 +150,7 @@ def find_cache_path():
|
|||
cache_name = os.environ["cache_name"]
|
||||
else:
|
||||
# try to get branch name from git
|
||||
bs = run_cmd("git branch", os.path.dirname(__file__)).splitlines()
|
||||
bs = run_cmd("git branch 2>&1", os.path.dirname(__file__)).splitlines()
|
||||
for b in bs:
|
||||
if b.startswith("* "): break
|
||||
cache_name = b[2:]
|
||||
|
|
Loading…
Reference in New Issue