Skip to content

Commit fdda852

Browse files
authored
Simplify the notation for installing by hash to just emsdk install HASH (#767)
Previously this had to be emsdk install sdk-releases-upstream-HASH The only thing preventing using just the hash was that there was no default for the backend, so defaulting to upstream fixes this. And then we can do emsdk install HASH
1 parent b85548d commit fdda852

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

emsdk.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,6 +2767,8 @@ def expand_sdk_name(name, activating):
27672767
backend = 'fastcomp'
27682768
return 'sdk-releases-%s-%s-64bit' % (backend, release_hash)
27692769
elif len(version) == 40:
2770+
if backend is None:
2771+
backend = 'upstream'
27702772
global extra_release_tag
27712773
extra_release_tag = version
27722774
return 'sdk-releases-%s-%s-64bit' % (backend, version)

test/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ def test_update_no_git(self):
259259

260260
def test_install_arbitrary(self):
261261
# Test that its possible to install arbrary emscripten-releases SDKs
262-
run_emsdk('install sdk-releases-upstream-5c776e6a91c0cb8edafca16a652ee1ee48f4f6d2')
262+
run_emsdk('install 5c776e6a91c0cb8edafca16a652ee1ee48f4f6d2')
263263

264264
# Check that its not re-downloaded
265-
checked_call_with_output(emsdk + ' install sdk-releases-upstream-5c776e6a91c0cb8edafca16a652ee1ee48f4f6d2', expected='Skipped', unexpected='Downloading:')
265+
checked_call_with_output(emsdk + ' install 5c776e6a91c0cb8edafca16a652ee1ee48f4f6d2', expected='Skipped', unexpected='Downloading:')
266266

267267

268268
if __name__ == '__main__':

0 commit comments

Comments
 (0)