Skip to content

Commit

Permalink
chore: add logs to download-swc ci job (#69425)
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi authored Aug 28, 2024
1 parent 992103f commit d822525
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/next/src/lib/download-swc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function extractBinary(
})

if (!fs.existsSync(path.join(cacheDirectory, tarFileName))) {
Log.info(`Downloading swc package ${pkgName}...`)
Log.info(`Downloading swc package ${pkgName}... to ${cacheDirectory}`)
await fs.promises.mkdir(cacheDirectory, { recursive: true })
const tempFile = path.join(
cacheDirectory,
Expand Down Expand Up @@ -81,7 +81,11 @@ async function extractBinary(
})
)
})

await fs.promises.access(tempFile) // ensure the temp file existed
await fs.promises.rename(tempFile, path.join(cacheDirectory, tarFileName))
} else {
Log.info(`Using cached swc package ${pkgName}...`)
}
await extractFromTar()

Expand Down

0 comments on commit d822525

Please sign in to comment.