diff --git a/dist/ciff/requirements.txt b/dist/ciff/requirements.txt index 0c6dcc2a..b3694526 100644 --- a/dist/ciff/requirements.txt +++ b/dist/ciff/requirements.txt @@ -1,3 +1,3 @@ -setuptools==49.2.0 -wheel==0.34.2 -PyGithub==1.51 +setuptools==49.6.0 +wheel==0.35.1 +PyGithub==1.53 diff --git a/dist/index.js b/dist/index.js index 5c4d4735..b72480cf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3478,6 +3478,7 @@ class HTTPError extends Error { } exports.HTTPError = HTTPError; const IS_WINDOWS = process.platform === 'win32'; +const IS_MAC = process.platform === 'darwin'; const userAgent = 'actions/tool-cache'; /** * Download a tool from an url and stream it into a file @@ -3693,6 +3694,36 @@ function extractTar(file, dest, flags = 'xz') { }); } exports.extractTar = extractTar; +/** + * Extract a xar compatible archive + * + * @param file path to the archive + * @param dest destination directory. Optional. + * @param flags flags for the xar. Optional. + * @returns path to the destination directory + */ +function extractXar(file, dest, flags = []) { + return __awaiter(this, void 0, void 0, function* () { + assert_1.ok(IS_MAC, 'extractXar() not supported on current OS'); + assert_1.ok(file, 'parameter "file" is required'); + dest = yield _createExtractFolder(dest); + let args; + if (flags instanceof Array) { + args = flags; + } + else { + args = [flags]; + } + args.push('-x', '-C', dest, '-f', file); + if (core.isDebug()) { + args.push('-v'); + } + const xarPath = yield io.which('xar', true); + yield exec_1.exec(`"${xarPath}"`, _unique(args)); + return dest; + }); +} +exports.extractXar = extractXar; /** * Extract a zip * @@ -4001,6 +4032,13 @@ function _getGlobal(key, defaultValue) { /* eslint-enable @typescript-eslint/no-explicit-any */ return value !== undefined ? value : defaultValue; } +/** + * Returns an array of unique values. + * @param values Values to make unique. + */ +function _unique(values) { + return Array.from(new Set(values)); +} //# sourceMappingURL=tool-cache.js.map /***/ }), diff --git a/dist/vendor/PyGithub-1.51.tar.gz b/dist/vendor/PyGithub-1.51.tar.gz deleted file mode 100644 index 0a8b5805..00000000 Binary files a/dist/vendor/PyGithub-1.51.tar.gz and /dev/null differ diff --git a/dist/vendor/PyGithub-1.53.tar.gz b/dist/vendor/PyGithub-1.53.tar.gz new file mode 100644 index 00000000..f6df88bf Binary files /dev/null and b/dist/vendor/PyGithub-1.53.tar.gz differ diff --git a/dist/vendor/setuptools-49.2.0.zip b/dist/vendor/setuptools-49.6.0.zip similarity index 85% rename from dist/vendor/setuptools-49.2.0.zip rename to dist/vendor/setuptools-49.6.0.zip index 9a09b85c..3a588f2a 100644 Binary files a/dist/vendor/setuptools-49.2.0.zip and b/dist/vendor/setuptools-49.6.0.zip differ diff --git a/dist/vendor/wheel-0.34.2.tar.gz b/dist/vendor/wheel-0.34.2.tar.gz deleted file mode 100644 index d31f4fb0..00000000 Binary files a/dist/vendor/wheel-0.34.2.tar.gz and /dev/null differ diff --git a/dist/vendor/wheel-0.35.1.tar.gz b/dist/vendor/wheel-0.35.1.tar.gz new file mode 100644 index 00000000..a609efa3 Binary files /dev/null and b/dist/vendor/wheel-0.35.1.tar.gz differ