Skip to content

Commit cf07a98

Browse files
authored
add support for tar.xz tarballs
1 parent d4bb33b commit cf07a98

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

platformio/package/meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def _parse_uri(self, raw):
396396
parts.path.endswith(".git"),
397397
# Handle GitHub URL (https://github.com/user/package)
398398
parts.netloc in ("github.com", "gitlab.com", "bitbucket.com")
399-
and not parts.path.endswith((".zip", ".tar.gz")),
399+
and not parts.path.endswith((".zip", ".tar.gz", ".tar.xz")),
400400
]
401401
hg_conditions = [
402402
# Handle Developer Mbed URL

platformio/package/unpack.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def new_archiver(path):
152152
magic_map = {
153153
b"\x1f\x8b\x08": TARArchiver,
154154
b"\x42\x5a\x68": TARArchiver,
155+
b"\xfd\x37\x7a\x58\x5a\x00": TARArchiver,
155156
b"\x50\x4b\x03\x04": ZIPArchiver,
156157
}
157158
magic_len = max(len(k) for k in magic_map)

0 commit comments

Comments
 (0)