Skip to content

Commit d34bbc3

Browse files
committed
Better formatting
1 parent a2281ed commit d34bbc3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cudadeps.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,24 @@ if (fs.existsSync(versionListPath) && process.env.npm_command !== "ci") {
5959
const versionList = JSON.parse(fs.readFileSync(versionListPath, { encoding: "utf8" }));
6060
const versionListHash = hasher({ sort: true }).hash(versionList) + "_" + cudaSubfolder;
6161
const downloadMarkerPath = path.join(resolvedPath, downloadMarkerFile);
62+
6263
if (!fs.existsSync(downloadMarkerPath) || fs.readFileSync(downloadMarkerPath).toString() !== versionListHash) {
6364
console.info(`Downloading components ${components} for ${arch} - ${platform}`);
65+
6466
for (const componentId of components) {
6567
const componentVersion = versionList[componentId].version;
6668
const archivePath = `${repoUrl}/${componentId}/${cudaSubfolder}/${componentId}-${cudaSubfolder}-${componentVersion}-archive.${archiveExt}`;
69+
6770
console.info(`Downloading ${archivePath}...`);
6871
const file = await fetch(archivePath);
6972
if (!file.body || !file.ok) throw new Error(`Downloading ${archivePath} failed`);
7073
const data = await buffer(file.body);
7174
console.info(`Done.`);
72-
console.info(`Extracting...`);
7375

76+
console.info(`Extracting...`);
7477
const archiveFiles = (await decompress(data, { plugins: [decompressTarXz(), decompressUnzip()] })) as (decompress.File & { linkname?: string })[];
78+
console.info(`Done`);
79+
7580
archiveFiles.sort((x, y) => x.type.localeCompare(y.type));
7681
for (const d of archiveFiles) {
7782
if (d.path.toLowerCase().includes(fileExt) && !d.path.toLowerCase().includes("/stubs/")) {
@@ -91,6 +96,5 @@ if (fs.existsSync(versionListPath) && process.env.npm_command !== "ci") {
9196
}
9297

9398
fs.writeFileSync(downloadMarkerPath, versionListHash);
94-
console.info(`Done`);
9599
}
96100
}

0 commit comments

Comments
 (0)