Commit Graph

24 Commits

Author SHA1 Message Date
Henry Mercer 906452d251 Merge branch 'main' into revert-2767-cklin/prefer-gtar 2025-02-18 10:47:19 +00:00
Henry Mercer 65a3aa1fbc Revert "Prefer gtar if available" 2025-02-18 10:38:41 +00:00
Chris Smowton 2be5f244ff Pass --ignore-zeros to tar when decompressing zstd-compressed tarballs
See comment in the diff for full explanation.
2025-02-17 17:04:36 +00:00
Chuan-kai Lin 61c77a48ff Prefer gtar if available 2025-02-14 13:34:30 -08:00
Chuan-kai Lin 4267fa66a2 getTarVersion(): add programName parameter
This commit changes getTarVersion() so that it receives the name of the
tar program from the caller instead of using the hardcoded string "tar".
2025-02-14 13:24:19 -08:00
Chuan-kai Lin c4a8587f45 Add TarVersion.name field
This refactoring commit records the name of the tar program in the new
TarVersion.name field and makes extractTarZst() use the new field
instead of the hardcoded name "tar". Code behavior remains unchanged
because currently TarVersion.name is always "tar".

This is the first step toward supporting a tar program under a different
executable name.
2025-02-14 12:08:07 -08:00
Henry Mercer d23f49f56f Fix assumption that download URLs contain file extension
This is not the case when downloading the bundle from a GitHub Release synced to GHES with the CodeQL Action sync tool.
2025-01-22 13:02:45 +00:00
Henry Mercer b58f4471c8 Use @actions/io to locate binaries 2024-12-19 14:21:06 +00:00
Henry Mercer b2a4442810 Ensure destination directory exists when streaming extraction 2024-12-03 18:22:44 +00:00
Henry Mercer d5bcf48469 Add more error handling to zstd extraction 2024-12-03 18:22:28 +00:00
Henry Mercer 198fb4b4b2 Extract directly to toolcache when feature enabled 2024-12-02 18:23:41 +00:00
Henry Mercer be26fe61b5 Enable specifying extraction destination 2024-12-02 17:58:30 +00:00
Angela P Wen b500b62cea Throw configuration error when tar is not available 2024-11-18 11:21:11 -08:00
Henry Mercer 06361b4d2b Bump high water mark when downloading bundle to 16 MB 2024-10-22 21:18:03 +01:00
Henry Mercer 8c3a732e36 Bundle install: Only use stdin for streaming 2024-10-22 17:32:33 +01:00
Henry Mercer cd83b08c78 Add streaming API for zstd extraction 2024-10-10 19:48:20 +01:00
Henry Mercer bf2e624d0b Update src/tar.ts
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2024-10-07 10:25:25 +01:00
Henry Mercer 057e1ecd3d Check zstd is on the path in addition to tar version 2024-10-04 19:20:21 +01:00
Henry Mercer 28db28fc03 Improve clean up if extraction fails 2024-10-02 15:45:55 +01:00
Henry Mercer 3da852e107 Capture stderr from extracting .tar.zst 2024-10-02 15:32:34 +01:00
Henry Mercer a7a6a6951e Determine zstd availability earlier on to simplify log 2024-09-23 22:39:47 +01:00
Henry Mercer 27dbb1ab21 Infer compression method from URL
Using the downloaded path is unreliable since we may have removed the file extension.
2024-08-29 18:09:34 +01:00
Henry Mercer 335044a8db Add detected tar version to telemetry 2024-08-29 17:45:08 +01:00
Henry Mercer ffa1b05b27 Only try zstd for specified version ranges of tar 2024-08-29 17:28:43 +01:00