mirror of
https://github.com/actions/checkout.git
synced 2024-12-22 10:45:32 +00:00
Check platform for extension (#1732)
This commit is contained in:
parent
44c2b7a8a4
commit
24ed1a3528
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -1574,7 +1574,9 @@ function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath,
|
|||
// Write archive to disk
|
||||
core.info('Writing archive to disk');
|
||||
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);
|
||||
archiveData = Buffer.from(''); // Free memory
|
||||
// Extract archive
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue