Fix file permissions when extracting zip files (#325)

This means that `./emsdk` works on UNIX system after emsdk self-updates
from a zip file.  Without this one would need to run `python ./emsdk`
which seems to be why the tests were doing it this way.
This commit is contained in:
Sam Clegg
2019-08-26 23:06:56 -07:00
committed by GitHub
parent da4900b83f
commit 596bdc5ea4
3 changed files with 12 additions and 5 deletions

7
test.py Normal file → Executable file
View File

@@ -1,3 +1,4 @@
#!/usr/bin/env python
import json
import os
import shlex
@@ -149,13 +150,13 @@ temp_dir = tempfile.mkdtemp()
for filename in os.listdir('.'):
if not filename.startswith('.') and not os.path.isdir(filename):
shutil.copyfile(filename, os.path.join(temp_dir, filename))
shutil.copy2(filename, os.path.join(temp_dir, filename))
os.chdir(temp_dir)
check_call('python ./emsdk update')
check_call('./emsdk update')
print('second time')
check_call('python ./emsdk update')
check_call('./emsdk update')
print('verify downloads exist for all OSes')
latest_hash = TAGS['releases'][TAGS['latest']]