Strip the tot value. (#375)
Opening it and saving it in an editor can add a newline, and we have user reports of this happening for users. Fixes emscripten-core/emscripten#9651
This commit is contained in:
Родитель
c56422590b
Коммит
e375d247f2
8
emsdk.py
8
emsdk.py
|
@ -1874,11 +1874,15 @@ def find_latest_releases_sdk(which):
|
||||||
return 'sdk-releases-%s-%s-64bit' % (which, find_latest_releases_hash())
|
return 'sdk-releases-%s-%s-64bit' % (which, find_latest_releases_hash())
|
||||||
|
|
||||||
|
|
||||||
|
def find_tot():
|
||||||
|
return open(tot_path()).read().strip()
|
||||||
|
|
||||||
|
|
||||||
def find_tot_sdk(which):
|
def find_tot_sdk(which):
|
||||||
if not os.path.exists(tot_path()):
|
if not os.path.exists(tot_path()):
|
||||||
print('Tip-of-tree information was not found, run emsdk update-tags')
|
print('Tip-of-tree information was not found, run emsdk update-tags')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
tot = open(tot_path()).read()
|
tot = find_tot()
|
||||||
if not tot:
|
if not tot:
|
||||||
print('Tip-of-tree build was not found, run emsdk update-tags (however, if there is no recent tip-of-tree build, you may need to wait)')
|
print('Tip-of-tree build was not found, run emsdk update-tags (however, if there is no recent tip-of-tree build, you may need to wait)')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -2070,7 +2074,7 @@ def load_releases_tags():
|
||||||
tags = list(info['releases'].values())
|
tags = list(info['releases'].values())
|
||||||
# Add the tip-of-tree, if it exists.
|
# Add the tip-of-tree, if it exists.
|
||||||
if os.path.exists(tot_path()):
|
if os.path.exists(tot_path()):
|
||||||
tot = open(tot_path()).read()
|
tot = find_tot()
|
||||||
if tot:
|
if tot:
|
||||||
tags.append(tot)
|
tags.append(tot)
|
||||||
return tags
|
return tags
|
||||||
|
|
Загрузка…
Ссылка в новой задаче