mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 00:44:55 -06:00
Display a warning if a modern distribution URL doesn't end in .wsl (#12463)
This commit is contained in:
parent
8eb7d8c3df
commit
52d1e510ae
@ -403,6 +403,8 @@ def read_tar(flavor: str, name: str, file, elf_magic: str):
|
||||
|
||||
def read_url(flavor: str, name: str, url: dict, elf_magic):
|
||||
hash = hashlib.sha256()
|
||||
if not url['Url'].endswith('.wsl'):
|
||||
warning(flavor, name, f'Url does not point to a .wsl file: {url["Url"]}')
|
||||
|
||||
if url['Url'].startswith('file://'):
|
||||
with open(url['Url'].replace('file:///', '').replace('file://', ''), 'rb') as fd:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user