Skip to content

Commit f47a2e2

Browse files
committed
fix: guard xz archives with a flag and disable it (it's slower than expected)
Signed-off-by: Sam Gammon <[email protected]>
1 parent f8affd5 commit f47a2e2

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/releases.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import {
1818

1919
const downloadPathV1 = 'cli'
2020

21+
const ENABLE_XZ = false
22+
2123
/**
2224
* Version info resolved for a release of Buildless.
2325
*/
@@ -287,17 +289,19 @@ async function maybeDownload(
287289
defaultArchiveType = ArchiveType.ZIP
288290
}
289291

290-
// check for `xz` support, use it if we can, the archives are smaller
291-
try {
292-
await io.which('xz', true)
293-
defaultArchiveType = ArchiveType.XZ
294-
core.debug(`Tool 'xz' found; using xz-based archives.`)
295-
} catch (err) {
296-
/* istanbul ignore next */
297-
core.debug(
298-
'Tool `xz` is not available on the host system; falling back to gzip archives.'
299-
)
300-
defaultArchiveType = ArchiveType.GZIP
292+
if (ENABLE_XZ) {
293+
// check for `xz` support, use it if we can, the archives are smaller
294+
try {
295+
await io.which('xz', true)
296+
defaultArchiveType = ArchiveType.XZ
297+
core.debug(`Tool 'xz' found; using xz-based archives.`)
298+
} catch (err) {
299+
/* istanbul ignore next */
300+
core.debug(
301+
'Tool `xz` is not available on the host system; falling back to gzip archives.'
302+
)
303+
defaultArchiveType = ArchiveType.GZIP
304+
}
301305
}
302306

303307
// build download URL, use result from cache or disk

0 commit comments

Comments
 (0)