fix
This commit is contained in:
21
dist/index.js
generated
vendored
21
dist/index.js
generated
vendored
@@ -28291,6 +28291,7 @@ exports.getLatestVersion = getLatestVersion;
|
||||
const tc = __importStar(__nccwpck_require__(3472));
|
||||
const core = __importStar(__nccwpck_require__(7484));
|
||||
const httpm = __importStar(__nccwpck_require__(4844));
|
||||
const exec = __importStar(__nccwpck_require__(5236));
|
||||
/**
|
||||
* Download a specific version of the Clang.
|
||||
* @param version The version to download
|
||||
@@ -28315,8 +28316,24 @@ async function download(version) {
|
||||
core.info(`Downloading Clang ${version} (${process.platform}, ${process.arch}) from ${url} ...`);
|
||||
const archivePath = await tc.downloadTool(url);
|
||||
core.info(`Extracting Clang archive...`);
|
||||
const extractedPath = await tc.extractTar(archivePath, undefined, '-x --strip-components=1');
|
||||
const cachedPath = await tc.cacheDir(extractedPath, 'clang', version);
|
||||
let exit = await exec.exec('mkdir', ['-p', `/tmp/clang-${version}`]);
|
||||
if (exit !== 0) {
|
||||
throw new Error(`Failed to create directory /tmp/clang-${version}`);
|
||||
}
|
||||
exit = await exec.exec('tar', [
|
||||
'-x',
|
||||
'--strip-components=1',
|
||||
'--warning=no-unknown-keyword',
|
||||
'--overwrite',
|
||||
'-C',
|
||||
`/tmp/clang-${version}`,
|
||||
'-f',
|
||||
archivePath
|
||||
]);
|
||||
if (exit !== 0) {
|
||||
throw new Error(`Failed to extract clang`);
|
||||
}
|
||||
const cachedPath = await tc.cacheDir(`/tmp/clang-${version}`, 'clang', version);
|
||||
return cachedPath;
|
||||
}
|
||||
async function getLatestVersion() {
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user