mirror of
https://github.com/actions/setup-python.git
synced 2025-07-18 09:48:21 +02:00
Delete downloaded archive after extracting it during install
This commit is contained in:
parent
6ed2c67c8a
commit
171df76505
4 changed files with 21 additions and 0 deletions
|
@ -18,6 +18,7 @@ import {
|
|||
getBinaryDirectory,
|
||||
getDownloadFileName
|
||||
} from './utils';
|
||||
import {rm} from '@actions/io/lib/io-util';
|
||||
|
||||
export async function installPyPy(
|
||||
pypyVersion: string,
|
||||
|
@ -81,6 +82,9 @@ export async function installPyPy(
|
|||
downloadDir = await tc.extractTar(pypyPath, undefined, 'x');
|
||||
}
|
||||
|
||||
core.info('Deleting downloaded archive...');
|
||||
await rm(pypyPath);
|
||||
|
||||
// root folder in archive can have unpredictable name so just take the first folder
|
||||
// downloadDir is unique folder under TEMP and can't contain any other folders
|
||||
const archiveName = fs.readdirSync(downloadDir)[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue