mirror of
https://github.com/actions/setup-python.git
synced 2025-12-17 05:52:37 +00: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,
|
||||
getNextPageUrl
|
||||
} from './utils';
|
||||
import {rm} from '@actions/io/lib/io-util';
|
||||
|
||||
const TOKEN = core.getInput('token');
|
||||
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
|
||||
|
|
@ -66,6 +67,9 @@ export async function installGraalPy(
|
|||
core.info('Extracting downloaded archive...');
|
||||
downloadDir = await tc.extractTar(graalpyPath);
|
||||
|
||||
core.info('Deleting downloaded archive...');
|
||||
await rm(graalpyPath);
|
||||
|
||||
// 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