Compare commits

...

1 Commits

Author SHA1 Message Date
Cory Miller
156c181c0f Check platform for extension 2024-05-09 15:37:36 +00:00
2 changed files with 6 additions and 2 deletions

4
dist/index.js vendored
View File

@ -1574,7 +1574,9 @@ function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath,
// Write archive to disk // Write archive to disk
core.info('Writing archive to disk'); core.info('Writing archive to disk');
const uniqueId = (0, uuid_1.v4)(); const uniqueId = (0, uuid_1.v4)();
const archivePath = path.join(repositoryPath, `${uniqueId}.tar.gz`); const archivePath = IS_WINDOWS
? path.join(repositoryPath, `${uniqueId}.zip`)
: path.join(repositoryPath, `${uniqueId}.tar.gz`);
yield fs.promises.writeFile(archivePath, archiveData); yield fs.promises.writeFile(archivePath, archiveData);
archiveData = Buffer.from(''); // Free memory archiveData = Buffer.from(''); // Free memory
// Extract archive // Extract archive

View File

@ -35,7 +35,9 @@ export async function downloadRepository(
// Write archive to disk // Write archive to disk
core.info('Writing archive to disk') core.info('Writing archive to disk')
const uniqueId = uuid() 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) await fs.promises.writeFile(archivePath, archiveData)
archiveData = Buffer.from('') // Free memory archiveData = Buffer.from('') // Free memory