3
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2025-04-23 20:05:33 +00:00

Check platform for extension (#1732)

This commit is contained in:
Cory Miller 2024-05-16 13:40:36 -04:00 committed by GitHub
parent 44c2b7a8a4
commit 24ed1a3528
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -35,7 +35,9 @@ export async function downloadRepository(
// Write archive to disk
core.info('Writing archive to disk')
const uniqueId = uuid()
const archivePath = path.join(repositoryPath, `${uniqueId}.tar.gz`)
const archivePath = IS_WINDOWS
? path.join(repositoryPath, `${uniqueId}.zip`)
: path.join(repositoryPath, `${uniqueId}.tar.gz`)
await fs.promises.writeFile(archivePath, archiveData)
archiveData = Buffer.from('') // Free memory