Commit fba7730
Detect archive format by magic bytes when extension is missing
The micro.mamba.pm server stopped redirecting to versioned URLs like
micromamba-2.5.0-2.tar.bz2 and now serves files directly via GET with
a Content-Disposition header. Since the download URL (/latest) has no
file extension, the temp file landed with no extension, causing unpack()
to raise "Unsupported archive type". Fix by falling back to magic byte
detection (GZip: 1F 8B, BZip2: BZh, ZIP: PK) when the extension is
absent or unrecognized.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent e6ea0b6 commit fba7730
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
164 | 188 | | |
165 | 189 | | |
166 | 190 | | |
| |||
0 commit comments