Skip to content

Commit f7dd68c

Browse files
committed
fix: support txz for custom download urls
Signed-off-by: Sam Gammon <sam@elide.dev>
1 parent e54567e commit f7dd68c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/releases.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ async function maybeDownload(
301301
let elideDir: string | null = null
302302

303303
try {
304+
core.debug(`Checking for cached tool 'elide' at version '${version.tag_name}'`)
304305
elideDir = toolCache.find('elide', version.tag_name, options.arch)
305306
} catch (err) {
306307
/* istanbul ignore next */
@@ -373,7 +374,9 @@ export async function downloadRelease(
373374
// sniff archive type from URL
374375
let archiveType: ArchiveType = ArchiveType.GZIP
375376
/* istanbul ignore next */
376-
if (options.custom_url.endsWith('.zip')) {
377+
if (options.custom_url.endsWith('.txz')) {
378+
archiveType = ArchiveType.TXZ
379+
} else if (options.custom_url.endsWith('.zip')) {
377380
archiveType = ArchiveType.ZIP
378381
}
379382

0 commit comments

Comments
 (0)